Weird crash when stack is in use

William Prothero prothero at earthednet.org
Fri Jan 1 12:50:57 EST 2016


Folks:
First, Happy New Year. I’ve gotten obsessed with a very odd crash that’s stopping my progress, so here it is.

I am on Mac El-Capitan 10.11.2 and Livecode 7.1. I have a splash stack that launches my main stack, which has several substacks. When I load my main stack, I “start using “ all of the library stacks that I need. There is a handler in one of the library stacks that calls a script in the main stack’s stack script. This script (in the library stack) can’t find the handler in the stack that calls it. So, I tried to “start using “ the main stack. This crashes livecode. 

Is it bad practice to “start using “ the main application stack? When I look at “the target”, I get the reference to the button where the action was initiated, but the IDE says that it can’t find the handler.

Here’s the sequence:

--Launch splash app

—button click on splash app opens the main app

—script in cd 1 initializes the main app and “starts using” the library apps and substacks

Resut: If, in the initialization routine (in the card script of card 1 of the main app), I do:

put the name of this stack into sName
if not (the stacksinuse contains sName) then
    start using sName
end if

—result: livecode crashes. No error messages, just disappears.

If I don’t put the above statements in the initialization routine, LC does not crash, but then
handlers in one of the library stacks can’t find the function handler in the main app stack script.

?? This is quite frustrating and caps of a day of tedious coding that I thought was finished, until this problem surfaced. Livecode crashes without any dialog, error report. It just disappears.

Any suggestions would be much appreciated.
Best,
Bill

William Prothero, Ph.D.
University of California, Santa Barbara, Emeritus
prothero at earthednet.org







More information about the use-livecode mailing list