On 2020-04-02 16:11, ToddAndMargo via perl6-users wrote:
On 2020-04-01 17:56, ToddAndMargo via perl6-users wrote:
On Wed, Apr 1, 2020 at 4:09 AM ToddAndMargo via perl6-users
<perl6-us...@perl.org <mailto:perl6-us...@perl.org>> wrote:
all around the Windows version of Raku and are about
to pull all your hair out and have run out of
swear words (not an admission that I cuss), add
--optimize=0
to your run string:
raku --optimize=0 FileAttributes.pl6
On 2020-04-01 05:30, yary wrote:
Sounds like a bug report is in order- with the FileAttributes.pl6,
and how it behaves differently with / without --optimize=0
-y
Hi Yary,
FileAttributes.pl6 is a Windows utility I wrote to
show the attributes or files and/or directories.
"Encrypted" directories show up like a soar thumb.
Being the masochist I am, I put a "--SetReg" switch
in it to automatically set up the Registry to
allow FileAttributes to use Windows Explorer's
(not IE) context menu. I have a WinReg.pm6 modules
that does several registry functions.
FileAttribures makes six calls to
nf-winreg-regopenkeyexw
nf-winreg-regcreatekeyexw
nf-winreg-regflushkey
nf-winreg-regclosekey
Three calls to
nf-winreg-regsetvalueexw
Flushing helped, but did not cure the issue.
And, joy of joy's, writing to the registry works,
but only the first time. After that, if you want
to change value, it will process partially and
randomly exit the program at random points without
an error message. If you manually erase all
the registry entries, it will proceed to finish
again.
Changing the optimizer setting helped "somewhat".
The program would still exit at random places
without an error, but would get further into
the program before doing such.
Now is this a Windows issue? Most probably.
Windows is an awful operating system. It
is what it is and as long as 95% of my customer
are using it, I have to support it, regardless
of how much I adobe Fedora. Windows put a lot
of food on my table.
Is it a Raku problem? Probably only a little.
Raku iR still pretty young and still takes
over 10 seconds to compile large programs.
And I adore Raku so much, going elsewhere is
not going to happen.
Is it a NativeCall problem? Most certainly.
The dying always occurs in one of its calls.
Now how to report this bug? It does not reproduce
with simple one liners. I would require the
developers to sift though literally hundreds of
lines of code over multiple modules. I don't
see that happening.
I have been chasing ghosts.
-T
Killed the ghost. Details will follow tomorrow
Okay. The problem was me trying to be responsible and
clean up after myself with nf-winbase-localfree.
I either did not understand what nf-winbase-localfree
did or I tripped across a bug in Kernel32.dll or both.
Local Free:
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-localfree
This created a situation where I was writing to memory
that was not my own. This exits your program without
and error message.
Removing nf-winbase-localfree from my RegCloseKey sub
cured the issue.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Computers are like air conditioners.
They malfunction when you open windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~