Re: Re Avanti

<[email protected]> 07 Apr 2014 00:57:18 -0700
Newsgroups gmane.comp.windows.gui4cli
Message-ID <[email protected]>
Hi Dimitris,

Good to see you still pay attention to the Win7 issue and didn't gave up on it :)

> I *think* that sometimes g4c has a problem with the LOCAL attribute (which defines local variables).
> I've seen one or two instances where g4c execution stops, without any reason, when a routine with
> LOCAL variables is called.

That's the bizar behavior I also experience. It doesn't hang or crash. It just stops at a arbitrary
(as it looks) position in the script without any message, as if the "stop" command was executed.
It can be anywhere. Sometimes already in the xOnLoad or xOnOpen. Other times at more subtile points
like not returning from xRoutine calls or in a "for" loop.

I researched and argued so much that I'm now convinced that there basically are no issues (like bugs) in
the Gui4Cli interpreter that causing the problem. Avanti "can" run without any issues in win7 and
Currently my findings are that it all seams to depend on the combination; size of script and length of
install directory name.

> In the rare instances when this happened, just moving the LOCAL line one or two lines down,
>  solved the problem.

It might, but at the same time this could also be a change in the size of the script that solved the
issue "for the time being". If you encounter the issue again, you could try to run it from another
folder and fiddle around a bit with the length of the folder name.

I experience the same in my develop environment aswel as running it from a self-contained executable.
Even simply adding a comment could cause the issue, adding a e.g. say command could solve it again
"for the time being".

In my Win7 test setup I have the normal Gui4Cli install, a develop directory and a directory
where I prepare and "compile" the self-contained excecutable. This contains the main script and
six other guis that are loaded permanently. From there I copy the executable to nine (9) arbitrary
chosen directories spread over two HD's with each three partitions.

Most of the time the program runs fine on six or seven locations but fails on some others.
When I add to or modify the script, the locations where the program will succeed or fail often
changes to some other locations.

There's also something else on win7 that might be related. Depending on if Avanti "likes" the
install path or not, a file requester refuse to open at the desired path although I use the
"#$templates_path" syntax. It just opens at the templates folder of the location where I previously
ran the program. When it opens at the proper place it's for me the final indication that everything
else will also function as expeted.

Before I create the executable, I cleanup the scipts with a tool I wrote in C. It removes all tabs
and spaces at the start and end of the lines. I also removes blank lines and comments. It leaves
xVariables, xBuffers and xTextfile sections untouched. 

Even sometimes I'm lucky with the issue like yesterday. In the cleaned main script I inserted
some comment lines like "//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" before a few
suspected xRoutines. Still no luck but when I in despair copied a bunch of these lines (about
thirty) to the end of the script, it suddenly succeeded on all nine test locations.

All in all it's a bizar issue that doesn't show up in XP. Only problem I have there occasionally
is that Gui4Cli is a bit unstable when I edited a lot. This is always solved when I exit the
interpreter and does a "clean" launch.

The Avanti main script is, cleaned from comments and blank lines, 15366 true command lines.
It runs several timers, does extensive interfacing with three custom dll's, decrypts and runs
gc scripts from disk and it all works fine. Even with some luck on win7 :)

Chris

P.S.,
What happened to the Yahoo forums? Not even a preview option :(