Windows-mobile app won't run after being closed by Task Manager
Posted
by pithyless
on Stack Overflow
See other posts from Stack Overflow
or by pithyless
Published on 2010-03-17T11:08:28Z
Indexed on
2010/03/17
11:11 UTC
Read the original article
Hit count: 533
I've inherited some windows-mobile code that I've been bringing up-to-date. I've come across a weird bug, and I was hoping that even though a bit vague, maybe it will spark someone's memory:
Running the app (which is basically a glorified Forms app with P/Invoke gps code), I switch to the task manager, and close the app via End Task. Seems to exit fine (no errors and disappears from Task Manager). Unfortunately, the app refuses to start a second time until I reboot the phone or reinstall the CAB.
What's worse: this bug is reproducible on a HTC Diamond, but works fine (ie. can run again after EndTask) on an HTC HD2.
The only thing I can think of is some kind of timing race between a Dispose() and the Task Manager. Any ideas?
I'm also thinking of a workaround - I do have a working "Exit Application" routine that correctly cleans up the app; can I catch the EndTask event in the c# code in order to complete a proper cleanup?
Maybe I'm just missing the pain point... all ideas welcome :)
© Stack Overflow or respective owner