Stacks and windows don't purge on close?

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
nkrontir
Posts: 15
Joined: Wed Apr 12, 2006 3:24 am

Stacks and windows don't purge on close?

Post by nkrontir » Sun Nov 12, 2006 9:12 pm

Hi.

It seems that my processes never die when the executable has been built by Revolution, but hang even after the stacks close (this does not happen to a specific application, but to everything I have attempted to build as a standalone). I always check both "purge stack on close" as well as "purge window on close" on all stacks and check the "Set destroyStack property to true" in "Standalone Application Settings".

Setup: Windows Me, Revolution Studio 2.7
Any ideas?

oliverk
Site Admin
Site Admin
Posts: 53
Joined: Mon Feb 27, 2006 2:16 pm
Location: Edinburgh

Post by oliverk » Mon Nov 13, 2006 10:31 am

Hi Nkrontir,

When you build a standalone application, your stack is bound to the Revolution engine and the two are saved together.

If you close the stack, regardless of whether the destroyStack property is set to true, the Revolution engine will still be running, just the stack will have been removed from memory.

If you are building a standalone application it is normal to use "quit" rather than "close" to exit the application. This command will close the entire application and leave nothing in the Windows process list.

It may be a good idea to write your own handler to wrap around this, so that you don't accidently quit Revolution when you are working on the stack. For example:

Code: Select all

on applicationQuit
  if kDevelopmentMode then
    close this stack
  else
    quit 0
  end if
end applicationQuit
Hope this is some help.

Regards

Oliver
Oliver Kenyon
Software Developer
Runtime Revolution

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Mon Nov 13, 2006 11:14 am

Another thing you might wish to make sure is if there are any messages left in the pendingmessages. If you run a timed script

send myHandler to me in 40 milliseconds

the engine can not quit.

A common trick is to lock messages before trying to quit

lock messages
quit

Hope this helps,

Malte

nkrontir
Posts: 15
Joined: Wed Apr 12, 2006 3:24 am

Post by nkrontir » Mon Nov 13, 2006 6:01 pm

Hi guys.

I appreciate your help. This is what I did:

Code: Select all

on closeStack
  if the environment is "development" then
    close this stack
  else
    lock messages
    quit
  end if
end closeStack
which worked like a charm.

Thanks.

P.S: Do you think we should move it out of the "Windows" category, since I see now that it's not a windows-specific issue?

Post Reply

Return to “Windows”