On Wed, 2002-10-02 at 09:46, Matt Hebley wrote: > We ran into a similar problem when using a non-modal form before a modal > form. The problem only manifested itself when our app was launched by an > installer, and not when launched by the Launcher. > > We got a fatal on OS4.0 devices, and emulated (debug?) ROMs, and above. > > Never figured out a fix, but a workaround was to do the modal form first... > > I think in your case, it should be possible to do what you are doing without > the WinSetDrawWindow being called with NULL. Many people do this. Perhaps > there is something strange going on...
If you take a look at the source code for SysGetEvent, it tries to enter the previous window when this window goes away. This is usually safe as there's likely a window already there. In my case, the form is being drawn on top of nothing. No underlying window, no form, no nothing, so that there's an exit event with no window to return into, if you see what I mean. The event code sees this and punts by setting WinSetDrawWindow(NULL), which on a non-debug ROM is the display. The problem is that on a debug ROM, this sets a bogus pointer (badDrawWindowValue), which crashes quite a bit farther on, not providing any clues as to where the problem really lies. I think it's just a case of the authors of the two functions assuming different things about boundary cases. I'm surprised nobody mentioned this before (at least I couldn't find it in any FAQ, newsgroup, mailing list, or document I could lay hands on). -Ken -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
