You might try creating a debug routine which looks at the memory copy of the
form to insure that the event handler is not null. This would allow you to
determine the point at which the form becomes invalid
-----Original Message-----
From: Oliver King-Smith [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 22, 1999 14:23
To: Palm Developers Forum List
Subject: No Event Handler
In my application the user has a main form. There are several popup forms
that the user can call, and when I want to return to the main form I call
FrmReturnToForm( 0 ); This works almost all the time(>>95%), but every now
and again it fails with the error No Event Handler Form.c line 3772 (Palm
OS 3) and line 3555 (Palm OS 2).
I have tried opening and closing the form repeatedly, but the error does
not show up. I can reproduce the bug under POSE and if I stop the gremlin
before it opens the popup form, I find any popup form I open and close will
cause the system to crash. So I believe the main form has in someway
become corupted.
Here is the event trace prior to crashing with my comments
64.271: -> EvtEnqueuePenPoint: pen->x=209, pen->y=216.
64.271: <- EvtGetSysEvent: penDownEvent X:47 Y:40
64.271: <- EvtGetEvent: penDownEvent X:41 Y:26
64.271: <- EvtGetPen: screenX=41, screenY=26, penDown=1.
64.271: <- EvtGetPen: <<<eliding identical events>>>.
64.449: -> EvtEnqueuePenPoint: pen->x=-1, pen->y=-1.
64.449: <- EvtGetPen: screenX=41, screenY=26, penDown=0.
// Selecting the pop up form from the menu
64.449: -> EvtAddEventToQueue: menuEvent ItemID: 1002
64.462: <- EvtGetEvent: winExitEvent Enter: 000018B2 Exit: 0000C24A
64.462: <- EvtGetEvent: winEnterEvent Enter: 000018B2 Exit: 0000C24A
64.462: <- EvtGetEvent: menuEvent ItemID: 1002
64.462: -> EvtAddEventToQueue: frmLoadEvent ID: 1500
64.462: -> EvtAddEventToQueue: frmOpenEvent ID: 1500
// Load the pop up form
64.462: <- EvtGetEvent: frmLoadEvent ID: 1500
// Note the winExitEvent Exit ID is 18B2
64.462: <- EvtGetEvent: winExitEvent Enter: 00001D18 Exit: 000018B2
64.462: <- EvtGetEvent: winEnterEvent Enter: 00001D18 Exit: 000018B2
64.462: <- EvtGetEvent: frmOpenEvent ID: 1500
64.545: <- EvtGetSysEvent: penUpEvent X:47 Y:40
// This Y looks kinda big (coulb be -1)
64.545: <- EvtGetEvent: penUpEvent X:45 Y:4294967268
66.983: -> EvtEnqueuePenPoint: pen->x=179, pen->y=109.
66.983: <- EvtGetSysEvent: penDownEvent X:77 Y:147
66.983: <- EvtGetEvent: penDownEvent X:75 Y:79
66.983: -> EvtAddEventToQueue: ctlEnterEvent ID: 1504
66.983: <- EvtGetEvent: ctlEnterEvent ID: 1504
66.983: <- EvtGetPen: screenX=75, screenY=79, penDown=1.
66.983: <- EvtGetPen: <<<eliding identical events>>>.
67.138: -> EvtEnqueuePenPoint: pen->x=-1, pen->y=-1.
67.138: <- EvtGetPen: screenX=75, screenY=79, penDown=0.
67.138: -> EvtAddEventToQueue: ctlSelectEvent ID: 1504 On: 0
// The done button has been selected
67.154: <- EvtGetEvent: ctlSelectEvent ID: 1504 On: 0
// Note the Enter ID is different than the last exit ID
67.168: <- EvtGetEvent: winExitEvent Enter: 00001B9C Exit: 00001D18
The enter ID on the winExitEvent is different from the exit ID when we left
the form (I don't know if this matters).
Does anyone have any opinions as to what the problem might be, or how I can
track it down further.
Oliver