crash when moving between stacks (again)

Mike Bonner bonnmike at gmail.com
Wed Mar 9 10:18:52 EST 2011


do you have a closestack handler on your navigation stack? If not, that
might be when this occurs.  you
close this stack
and it does, but theres no
on closestack (unless you didn't list it, or I missed it) at which point the
closestack message will hit your engine stack and shut everything down.

On Wed, Mar 9, 2011 at 7:59 AM, Mike Bonner <bonnmike at gmail.com> wrote:

> When you say it crashes, does it just poof on you, or is there an actual
> error?
>
> If it just poofs, i'm wondering of the closestack message is reaching your
> engine stack when you close one of the others. Since all you have in that is
> quit, things would just go away.
>
>
> On Wed, Mar 9, 2011 at 12:32 AM, Tiemo Hollmann TB <toolbook at kestner.de>wrote:
>
>> Hi Nicolas,
>> Perhaps you could try to add a "pass ..." at the end of all standard
>> handlers like open and close, so that the engine can catch them too.
>> Actually I don't know what is happening inside, but perhaps the engine
>> still
>> wants to clean up some stuff, what it can't do without the pass?
>> Tiemo
>>
>> > -----Ursprüngliche Nachricht-----
>> > Von: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
>> > bounces at lists.runrev.com] Im Auftrag von Nicolas Cueto
>> > Gesendet: Mittwoch, 9. März 2011 00:43
>> > An: LiveCode - general list
>> > Betreff: crash when moving between stacks (again)
>> >
>> > Dear List,
>> >
>> > Posted this back in June. Got no reply. But am posting gain, in hopes.
>> >
>> > In short, one of my more convoluted Rev creations keeps crashing
>> > when some of its stacks close.
>> >
>> > It's a combination of stacks. Here are the pieces:
>> >
>> > - standalone-stack (holds the engine)
>> > - central-stack (for game-stack selection)
>> > - game-stacks (a myriad of these, some of them with substacks)
>> >
>> > Crashes happen when a game-stack is closed to return to the
>> central-stack.
>> > Moreso for some game-stacks than others.
>> >
>> > I double checked that every stack, substack, and card has a
>> > preopen/open/close handler, even if this is empty.
>> >
>> > I thought it may be a memory issue, cause the game-stack that almost
>> > always crashes has many URL-referenced image objects and runs on older
>> > Win machines. However, I tested on a newer machine with ample memory
>> > and cpu power, but  still get crashes.
>> >
>> > Below is an outline of the scripted inter-relation between stacks.
>> Perhaps
>> > someone will spot something I've overlooked
>> >
>> > Thank you.
>> >
>> > --
>> >
>> >
>> > Nicolas Cueto
>> >
>> > ------  S T A R T    O F     S C R I P T S   -----
>> >
>> > /*  In the card script of STANDALONE-STACK,
>> >    this handler sets stackFiles and then goes to
>> >   stack CENTRAL-STACK. */
>> >
>> > on setUpTheFoundation
>> >     start using stack "STANDALONE "
>> >     put "GAMESTACK1,gamestack1.rev" & cr & "GAMESTACK2,gamestack2.rev"
>> > & cr & ... \
>> >         & "animationEngine,animationEngine.rev"       into
>> tStackFiles
>> >     set the stackFiles of stack "niconiko" to tStackFiles
>> >     ## Set the globals used by all stacks
>> >     open stack "CENTRAL"
>> >     hide stack "STANDALONE"
>> > end setUpTheFoundation
>> >
>> > /* In stack script of CENTRALSTACK. */
>> >
>> > on closestack
>> >    quit
>> > end closestack
>> >
>> > /* In a go-to-gamestack button script on
>> >    CENTRALSTACK./
>> >
>> > on mouseUp
>> >    open stack GAMESTACK
>> >    hide stack CENTRALSTACK
>> > end mouseUp
>> >
>> > /* In the stack script of  BAD-GAMESTACK */
>> >
>> > on closeStack
>> >    ## Reset custom props of some grouped objects.
>> >    ## Clear pending messages
>> >    ## Clear the cachedURLs.
>> >    set the lockScreen to true
>> >    ## Set to empty the filename of 100 images.
>> >    set the lockScreen to false
>> >    go to card "main" of stack "gss"
>> >    show stack "gss"
>> >    delete stack "blitz"
>> > end closeStack
>> >
>> > /* In the card script of  BAD-GAMESTACK, which script
>> >    calls up the NAVIGATION-SUBSTACK that can take
>> >    user back to CENTRALSTACK.  */
>> >
>> > on rawKeyUp theKey
>> >    switch theKey
>> >       case "56"
>> >          modal stack NAVIGATION-SUBSTACK
>> >          pass rawKeyUp
>> >          exit rawKeyUp
>> >          exit to top
>> >          break
>> >     end switch
>> > end rawKeyUp
>> >
>> > on closecard
>> >    ## Clear the cachedURLs.
>> >    ## Cancel pending messages.
>> >    ## Reset custom props.
>> >    ## For each of 100 image objects:
>> >    ##   reset filename to "", outerglow,
>> >    ##   and innerglow.
>> >    ## Close the socket connection to
>> >    ## the local server.
>> > end closecard
>> >
>> > /* In the card script of  NAVIGATION-SUBSTACK. */
>> >
>> > on rawKeyUp theKey
>> >    put "49,50,51,52" into tGameControllerRightsideButtons
>> >    if theKey is not among the items of tGameControllerRightsideButtons
>> then
>> >       pass rawKeyUp
>> >       exit rawKeyUp
>> >    end if
>> >   ## Find which navigational image is on.
>> >    switch tCurentlyOnImage
>> >       case "quit"
>> >          send "closeStack" to stack BAD-GAMESTACK in 2 seconds
>> >          close this stack -- i.e., NAVIGATION-SUBSTACK... should I
>> > name the stack explicitly here?
>> >          exit to top
>> >          break
>> >    end switch
>> > end rawKeyUp
>> >
>> > ------     E N D    O F     S C R I P T S   -----
>> >
>> > _______________________________________________
>> > use-livecode mailing list
>> > use-livecode at lists.runrev.com
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription
>> > preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>



More information about the use-livecode mailing list