Deployed EXE does not exit if it has focus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Deployed EXE does not exit if it has focus

G Krupa-2
All,

I was testing a deployed EXE version of a game I'm working on, and found
that the process will not exit (voluntarily) if the Shell's view has focus
when I click the exit "X" on the system menu (the little X in the upper
right corner of the window).

If I first click on the desktop or another window and then click the "X"
without first giving the view focus, the process terminates as expected.  In
all cases, the view disappears, it's the process that remains (I can see and
kill it via the Task Manager).

The package in question was stripped down to basically nothing and can be
found at: www.redglyph.com/GSKGame.pac

I'm running D5.1pro pl2 under WinXP.  I've tried installing just this
package into a virgin image, and that exhibits this behavior as well.  Does
anyone know what's going on?  Is there something weird in the SessionManager
or ImageStipper I'm using that's causing this?

Cheers,

--GK


Reply | Threaded
Open this post in threaded view
|

Re: Deployed EXE does not exit if it has focus

G Krupa-2
After a lot of poking through SessionManager and InputState, I've figured
out that #noVisibleWindows isn't being sent to the SessionManager for a very
long time (if ever?), if the window (when closed) has the focus.

Further tracking lead me to conclude and InputState>>keepAlive wasn't being
called.  I tried sending #prod to InputState from #onViewClosed in my
Presenter, but that didn't work.  I'm stumped.

Can anyone suggest why this might be happening?  Sometimes the InputState
finally realizes there are no windows and sets off the chain of events that
causes the process to exit.  Sometimes this takes ~20 seconds, at the
moment, I'm counting into minutes for the latest test, with no certainty
it'll ever exit.

Q:  Is there a way to kick-start the InputState into realizing this?  #prod
didn't work.
Q:  Would it be safe to just call SessionManager>>quit when the main view is
closed (which from my app's point of view, signals the end of the line)?

Cheers,

--GK


Reply | Threaded
Open this post in threaded view
|

Re: Deployed EXE does not exit if it has focus

Christopher J. Demers
In reply to this post by G Krupa-2
"G Krupa" <[hidden email]> wrote in message
news:3fa98090$[hidden email]...
> I was testing a deployed EXE version of a game I'm working on, and found
> that the process will not exit (voluntarily) if the Shell's view has focus
> when I click the exit "X" on the system menu (the little X in the upper
> right corner of the window).
...

At some point Dolphin stopped properly closing an application if the shell
was closed.  It is interesting that you have discovered the subtlety about
the window having focus/not having focus.  See this thread for more info
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&safe=off&selm=bg90lu%24m1cil%241%40ID-50880.news.uni-berlin.de .
This is what I always use now:
SessionManager current isRuntime ifTrue: [SessionManager current exit].

Chris