Here's a detailed description of the MemoPad phase 21
bug.
Use CW 6, CW 6 beta, or CW v. 5, and POSE 2.1d29
emulating Palm IIIx with 4096Meg memory.
Start the program. Click the new button. After a
delay of a couple seconds, this error message appears:
"MemoPad" 1.0 has just written directly to memory manager
data structures. This problem indicates an error in the
application. Users should upgrade this product immediately
to safeguard their data.
After clicking the Debug button, I get this stack information:
0x10C73B7A(<unknown>)
0x10C73EBA(<unknown>)
0x10C0FC0E(<unknown>)
0x10C1065E(<unknown>)
__Startup__
PilotMain
EventLoop
0x10C4CF1E(<unknown>)
EditViewHandleEvent
EditViewRetrieveData
EditViewSetTitle
0x10C15832(<unknown>)
Here's the line of C code we're at in EventLoop():
// P3. Let the form object provide default handling of the event.
FrmDispatchEvent(&event);
Here's where we are in EditViewSetTitle(), line 1205
MemoPad.c:
endOfNewTitle += StrLen(endOfNewTitle);
Here's the line of assembly code where we're at:
10C15832: 4213 clr.b (a3)
According to EventLoop()'s variables window, the
current event is frmOpenEvent. But according to
EditViewHandleEvent()'s variables window, the
current event is nilEvent.
This problem does not occur in phase 22 of MemoPad.
Over the past several months, I have seen numerous
questions from programmers about error messages
similar to this. Judging by the performance of
MemoPad phase 21, the programmers at Palm
are just as susceptible to confusion about PalmOS
as the rest of us. In a way, this is reassuring. The
folks at Palm are fallible humans just like the rest
of us. It's also scary. If they can't program the
Palm correctly, what hope is there for us?
Probably I'm missing something obvious. Does anyone
know why MemoPad 21 fails, but MemoPad 22 does
not? The most obvious change is the addition of
code depending on the glue header files.
Happy New Year!
Greg Bungo
[EMAIL PROTECTED]
(630)949-3250 voice
(630)949-3299 fax