My main event loop looks like this:

static void AppEventLoop (void) {

   EventType    event;
   UInt16            error = 0;
   do {
     WinHandle  winH = WinGetActiveWindow ();
     if ( winH )
       ErrFatalDisplayIf ( ! WinValidateHandle ( winH ), "Invalid window" );

     EvtGetEvent ( &event, eventWaitTicks );
     if ( ! SysHandleEvent ( &event ) ) {
       if ( ! MenuHandleEvent ( 0, &event, &error ) ) {
         if ( ! AppHandleEvent ( &event ) ) {

                       etc...

Once I've draw my main form, if I try to do an EvtGetEvent in this 
loop, I get the message "YourApp has just read from an unallocated 
chunk of memory" on the call to EvtGetEvent. The stack trace shows 
(in order) AppEventLoop, SysGetEvent, WinSetDrawWindow, 
WinValidateHandle (where it blows up). Oddly, the stack trace doesn't 
show EvtGetEvent.

This says to me that WinValidateHandle is blowing up, but the handle 
validates OK immediately prior to this happening. (Yes, I have 
ERROR_CHECK_LEVEL turned on).

Does anyone have any  interesting suggestions, observations, 
comments, anything that might help me track this problem down? Thanks.

This is with POSE 3.0a7, 3.5 EZDebug ROM, Mac OS 9.0.2.

Regards,
Steve Mann

-- 
-------------------------------------------
Creative Digital Publishing Inc.
1315 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.784.9461              805.784.9462 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com

-- 
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