I'm getting a pretty annoying crash:

Here's my main event loop:

        do
        {
                EvtGetEvent (&event, 10);

                WinResetClip();

                if (!SysHandleEvent (&event))
                        if (!MenuHandleEvent (0, &event, &error))
                                if (!AppEventHandler (&event))
                                        FrmDispatchEvent (&event);
        } while (event.eType != appStopEvent);

Here's the problem:

Under certain conditions, when I get a WinEnterEvent, WinResetClip() will
cause the emulator to report "application has just read from unallocated
memory."  If I change the code to:

if (event.eType != winEnterEvent)
        WinResetClip();

then it crashes on the EvtGetEvent() for the next event (a nilEvent).  I'm
writing on a 3.1 ROM, but when I tried on a 3.5 debug ROM, the emulator
reported the memory error during WinValidateWindow.  It appears that my
window has gotten corrupted.  I've sprinkled some WinSetDrawWindow's around,
but it doesn't help.  I really appreciate any help that anyone can give me.

-Jeremy Sheeley
Soucegear


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to