Page 1 of 2

OpenStack not runnning

Posted: Tue Jun 18, 2019 11:31 am
by kaveh1000
I have had a stack running fine but suddenly on launching the stack, OpenStack does not run. If I say OpenStack in the message window it runs fine. Any ideas pls?

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 11:48 am
by bogs
First idea is what did you change last?
Second idea is you have something in your preOpenStack (or perhaps in a group) that is running the openStack handler and not passing it so it can run again in the location that is currently not working.

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 12:06 pm
by SparkOut
Also check the card script - the openStack (and other) messages follow the message path through the script of card 1 before the stack script. (It is common to put openStack or preOpenStack etc handlers in card 1 script to avoid substacks without openStack handlers from triggering the mainstack handler unnecessarily.)

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 12:21 pm
by kaveh1000
Bogs, I have made a lot of changes so hard to pin down what might have caused the change.

I have checked and no preOpenStack anywhere

There is no card script, only a stack script

There are several substacks, all of which had:

Code: Select all

on openstack
exit openstack
end openstack
This was because they all triggered the openstack of the main stack. (I know, not the best way.) Program was running fine with this for long time.

I have changed all these to "pass openstack", but still openstack is not being triggered in the main stack when stack is launched.

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 1:06 pm
by bogs
kaveh1000 wrote:
Tue Jun 18, 2019 12:21 pm
Bogs, I have made a lot of changes so hard to pin down what might have caused the change.
I realize I wasn't very clear in the first statement, I meant changes only since the last time it worked as it should :wink:
Of course, I always think people make backups before making changes like I do, or comment changes so they are easy to find in the scripts, like so:

Code: Select all

on mySillyExample
	if x=7 then
		put y*x into field 1
	else
		put "I dunno" into field 2
		// put "This didn't come up in class" into field 1  -- changed 01/02/2015 - found this did come up...
		put "This came up in class, but I forgot about it..." into field 1
	end if
on mySillyExample
so this may not be the case in your case, but if it is, you can always do a differential comparison between the last working and current not working and see which differences are altering the openStack event.
kaveh1000 wrote:
Tue Jun 18, 2019 12:21 pm
I have checked and no preOpenStack anywhere
Well, it was the only handler off the top of my (not yet awake 2 brain cells) that comes before openStack, and I *think* (although my understanding is far from complete) that groups are also in the message path before openStack. Jacque probably knows for sure, heh.

As SparkOut points out, there are a variety of places you can put a handler that is either before the one in question executes, or safer than sticking them in the stack level scripts.

What your tracking down is going to be a handler that executes the openStack message before the one that is failing, and isn't passing openStack to the one in question.

The only thing I can think of that *might* work to help track it is to stick 'breakpoint' right after every single 'openStack' and 'preOpenStack' you can find in your program, then step through and see where it goes in the debugger, but I'm sure there is probably a better way. Hopefully, someone else will suggest it :D

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 1:18 pm
by sphere
SparkOut wrote:
Tue Jun 18, 2019 12:06 pm
Also check the card script - the openStack (and other) messages follow the message path through the script of card 1 before the stack script. (It is common to put openStack or preOpenStack etc handlers in card 1 script to avoid substacks without openStack handlers from triggering the mainstack handler unnecessarily.)
mmmm, ok.
I was all these years under the assumption that the OpenStack or preOpenStack is one of the first things which was executed when opening a stack and this what you write only counted for buttons and other scripts when i look at the image of the messagepath. When i open a stack i would assume the Openstack is the first thing.
I always putted these handlers in the stackscript.

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 1:33 pm
by Klaus
Does this also happen (not happen) in a standalone?
I have experienced this in the IDE in the past, but could never reproduce it.

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 2:14 pm
by kaveh1000
Ah interesting Klaus. I just made a Standalone and openstack works fine there!!

I am using Indy 9.0.5 rc-1 on Mac

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 3:33 pm
by bogs
QUICK! Save that stack and submit a bug report! :D

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 3:35 pm
by kaveh1000
Unfortunately the stack is confidential, so I can't make it public. :-(

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 4:09 pm
by dunbarx
Hi.

Can you delete most of the content and scripts, so that the stack still has the issue? And can that then be sent to the team?

Craig

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 4:27 pm
by kaveh1000
Forum not allowing me to upload .5mB file as too large! uploaded here:

http://bit.ly/2MUfmaZ

Comments pls? Does anyone see openstack work? It is in the stack script

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 4:33 pm
by Klaus
No "Browse Tool" and no "hi" here on macOS 10.14.5 and LC 9.04.
I also restarted LC, same behavior! :(

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 5:01 pm
by kaveh1000
Thank you all, especially Klaus for hinting standalone is OK.

Bug reported:
https://quality.livecode.com/show_bug.cgi?id=22193

Re: OpenStack not runnning

Posted: Tue Jun 18, 2019 5:05 pm
by jacque
I don't know if this applies in your case, but if you close a stack and destroystack is false, the stack remains in RAM. The next time you open it, there are no open* messages sent because to the engine, the stack is already open.

If your scripts reference an unopened stack to get a property or something else, the same thing may happen because LC has already opened the stack. I'm not sure about this one because I've not needed to do that, but I did have to work around the first issue once.