Page 1 of 2

Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 6:34 am
by dr_mumps
First... it's hard to understand why the term "Standalone" is *ignored* in this forum's search since it is a term used by Livecode itself... go figure!

Using Livecode 9.5.0 build 15503 on Windows 7 enterprise 64 bit. Set the Standalone Application settings to only a Windows build (tried BOTH Windows x86 and Windows x86-64 separately and combined). "Search for required..." inclusion setting. "Remove all profiles ..." Property Profiles. Only 1 Stack.. no substacs... nothing tricky at all.

For one stack, the StandAlone Builder get to "Closing open stacks" ... and never finishes ... busy wheel keeps on spinning (after 10 minutes)
For another stack, the builder gets to "Attaching engine" ... and never finishes ... busy wheel keeps on spinning (after 10 minutes)

Using Livecode 8.1.10 build 14072 ... both stacks build PERFECTLY!

I will try the newest version of Livecode but I doiubt it will make any difference.

Any ideas?

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 3:14 pm
by dunbarx
Hi.

I am on a Mac, so cannot necessarily help. But searching for "standalone" does not fail so much as give up. If you read the message it tells you that the search word was too common, and it did not want to display the thousands of results it found. So you have refine the search criteria by adding other words or perhaps filters.

I make standalones all the time on my Mac, and never have an issue. I do select all inclusions by hand, and you might test that.

There, I told you I was going to be of no help.

Craig

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 3:36 pm
by FourthWorld
A lot can happen in a year. Might be worth trying this in the latest release, v9.6.1.

https://downloads.livecode.com/livecode/

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 6:29 pm
by dr_mumps
Thank you both for your replies... regarding searching for "standalone" ... ?too common? ... Really? Particularly when the term is a reference to a LIVECODE function ... I tried many variations (e.g. in quotes, case variations, etc... I'm no amateur in searching for things). I also tried "compile" but that search disregarded other "too" common words like "closing" and "file" but allowed "error" ... NOW THAT is a common word, particularly in a forum... but it allows that. I'm curious what anyone would use to search this forum for "standalone error closing open stacks".

BUT that really isn't my problem... the incomplete standalone compiles are. I did install v9.6.1 build 15522 ... with EXACTLY the same results/issues previously described as well as another instance on another stack which the compiler never finishes "attaching engine" stage.

I will spend some time with other stacks and try to isolate the point at which the compile fails so it can be diagnosed by Livecode.

But I would tremendously appreciate it if anyone has any suggestions (I'll try specifying the inclusions as suggested by dunbarx) or if anyone has had a similar issue with the standalone generation... ideally on a Windows platform but anything will help!

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 6:46 pm
by FourthWorld
Yeah, I find PHPBB's default search settings annoying too.

Thanks for bringing the project into the Chevy build. Helps rule out other causes.

I'm able to build on Windows in the latest version without issue. I'm afraid that doesn't help my ability to diagnose this.

Anyone else here able to reproduce this issue?

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 6:58 pm
by FourthWorld
What's happening in your closeStack handlers?

There's a note in v9 release notes about messages now being active during the build process.

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 7:14 pm
by dunbarx
There's a note in v9 release notes about messages now being active during the build process.
It is forbidden to shut down messages before starting a standalone build? No idea if this helps, hurts or doesn't matter to that process.

Also, have you tried the build in slightly earlier versions than 9.6.1?

Craig

Re: Standalone compile never leaves closing open stacks

Posted: Mon Nov 16, 2020 7:46 pm
by FourthWorld
dunbarx wrote:
Mon Nov 16, 2020 7:14 pm
There's a note in v9 release notes about messages now being active during the build process.
It is forbidden to shut down messages before starting a standalone build? No idea if this helps, hurts or doesn't matter to that process.
I have no idea why the change was made. Ultimately building needs to be moved to a separate process. I don't know why they still try to maintaining within the current working session.

As for older versions, I'm not sure that's especially valuable relative to the effort involved. It's a lot of work to keep downloading and testing older builds until you find the change, only rarely helps us diagnose the issue in the current version, and doesn't help move the work to the current version.

In this case we know that one very relevant difference in building relates to messaging. Let's first see what happens if he follows the instructions provided in the Release Notes for handling that.

Re: Standalone compile never leaves closing open stacks

Posted: Tue Nov 17, 2020 6:34 am
by dr_mumps
Thanks again for the input. On the two stacks which compiled to the "Attach Engine" stage and then froze, I did have "lock messages" within the handler I use to exit the app .. although I don't use the "on closeStack" handler... but simply on a button:
on mouseUp
--lock messages
set the destroyStack of this stack to true
close this stack
quit
end mouseUp

As can be seen, I've commented out the "lock messages" call, but the standalone generator still "stalls" at the "Attach Engine" stage in v 9.6.1 Business.

The other stack which was freezing at the "close open stacks" now hits that same point in the generation and then CRASHES the whole Livecode process at the OS level. What's even weirder with THIS stack is that if I restore the commented out "lock messages", so the code becomes the same as it was when it use to freeze, also crashes the Livecode process.

Is there an error trap / log for livecode I could examine to see if there is a related error?

Re: Standalone compile never leaves closing open stacks

Posted: Tue Nov 17, 2020 2:53 pm
by dunbarx
I did have "lock messages" within the handler I use to exit the app
It does not matter if you have such a line of code within a handler in a stack. These things are not visible to the process. I meant to lock messages from the toolbar before starting a standalone build, and whether that would be a good idea. I believe it is a bad idea; the builder likely needs all the tools it can muster to proceed.

Craig

Re: Standalone compile never leaves closing open stacks

Posted: Tue Nov 17, 2020 3:50 pm
by FourthWorld
Did you follow the instructions in the Release Notes about how to handle messages during build?

Re: Standalone compile never leaves closing open stacks

Posted: Tue Nov 17, 2020 6:18 pm
by dr_mumps
if you're referring to the following from release notes on v9.0.0:

on closeStack
if the mode of stack "revStandaloneProgress" > 0 then
exit closesStack
end if
end closeStack

yes ... kind-of ... since I don't use the "closeStack" handler specifically, I did try this in the button which actually closes the stack (as in my pervious message) ... no effect... same never ending "Attaching Engine"

I also installed V 9.6.1 onto a fresh install of Windows 10 pro (64 bit) ... just to eliminate the possibility of the OS or some other component causing the problem... SAME stall at the "Attaching Engine" stage... so I think it's safe to say it is in Livecode for those particular source.... and since v8.6.10 works perfectly... so the actual source isn't, technically, at fault. I should add that v9.6.1 *does* compile MUCH smaller, less complex sources just fine. Some of the sources involved with this problem are 5,000+ lines.

Again I appreciate the discussion/suggestions/ ideas... I need to spend some time trying to strip out code until one of the sources does compile successfully... and then re-introduce code until it breaks again... the old "scientific" approach. If I ever find the issue...you can be SURE that I'll post it here and let Livecode know.

Re: Standalone compile never leaves closing open stacks

Posted: Tue Nov 17, 2020 7:18 pm
by jacque
The so-called "fix" applies to all open* and close* handlers. That is, preOpenStack, openstack, closeStack, preOpenCard, openCard, closeCard, preOpenBackground, etc. Those are the handlers that need to be addressed with the fix which exits the handler if a standalone is being built. The card and background handlers only need fixing if they are in the stack script or the script of the first card, since card 1 is the only card the standalone builder will see.

If you have any of those handlers in the message path they may be affected depending on what they do. And yes, this is a pain in the patoot.

Re: Standalone compile never leaves closing open stacks

Posted: Wed Nov 18, 2020 8:41 pm
by dr_mumps
Here's an "interesting" bit of additional info regarding the standalone compile.

I mentioned that v8.1.10 works perfectly. Well, I decided to try to see if I could find a v9x version which DID work. I already determined that the newest version (v9.6.1) exhibits this issue for me.... and I had also tried v9.5.0 and v9.0.5 ... same issue. So I started with 9.0.0 and worked backwards.

Here are the results

V9.0.0 ... produces non-completing compile at "attaching engine" ...plus a VERY annoying "feature" which keeps the LC 9 splash screen active and un-removable ... obliterating part of the screen

V9.0rc1... produces non-completing compile at "attaching engine" ...plus a VERY annoying "feature"...

V9.0.dp11... produces non-completing compile at "attaching engine" ...plus a VERY annoying "feature"...

v9.0.dp10 ... SUCCESS and no "stuck" splash screen

All earlier "dp" version also work.

So "somewhere" between version dp10 and dp11, something changed which prevents my compiles from completing... sounds like a issue to take to Livecode itself. The "splash screen" issue was fixed by v9.0.1

Re: Standalone compile never leaves closing open stacks

Posted: Wed Nov 18, 2020 9:09 pm
by dunbarx
Great detective work.

Definitely send to Scotland.

Craig