I have been subscribed to this list for sometime and it has of 
immense help to me.  I thank everyone who participates in this list. 

This is the first time I am posting a question, one that has me quite 
perplexed.

I recently upgraded from CW6 to CW7 (for Macintosh) and from SDK 3.0 
to SDK 3.5.  I seem to have ironed out most of the problems resulting 
from the change except one.   My application supports categories, and 
has worked fine on 3.0 roms.  However, when I use 3.5 roms or 4.0 
roms, POSE crashes when I tap the category popup trigger.  It does 
not do this in other forms in the application, which implement 
categories in the exact same way.  Nor does it happen when I switch 
back to 3.0 roms.

What is even weirder is that when I put a breakpoint in on a 
penDownEvent (so I can watch what happens after I tap the category 
popup trigger), it then allows me to select a category and does not 
crash.  The code is not changed at all, all I have done is put a 
breakpoint in.  However, the second time I tap the popup trigger I 
get the same crash. 

Why would setting a breakpoint alter when my application crashes?

I should note that when the crash occurs, it never even gets to the 
point where my application can handle the ctlSelectEvent.  It seems 
to be crashing while the OS is still working through the event 
handling routines.

At the time the time of the crash, the debugger stack looks like this:

PilotMain
MyApplicationMain
AppEventLoop
0x10C697FC (FrmDispatchEvent)
0x10C65E7A (PrvSendEventToForm)
0x10C6AD6E (FrmHandleEvent)
0x10C5B386 (CtlHandleEvent)
0x10C5A8A8 (PrvDrawControl)
0x10C5A8A8 (PrvDrawControl)
0x10C167B4 (StrLen)

Specifically, the emulator reports the following error:

"MyApplication has just read from memory location 0x00018AD0, which 
is an unallocated chunk of memory.

An 'unallocated chunk of memory' is a chunk of memory that has not 
been reserved for use by the application through calling MemPtrNew or 
MemHandleNew.  It should not be accessed by applications under any 
circumstances.  Such an access usually means that an application is 
accessing a chunk that used to be allocated to the application but 
has since been returned with MemPtrFree or MemHanldeFree."

I have been through my code a thousand times and I really don't see 
any attempt to access memory that has been already freed.  The crash 
is occurring while the OS is converting the penDownEvent into a 
ctlEnterEvent.

And what is really weird is that the crash goes away on the first pen 
down if there is a breakpoint set.

If anyone can give me any ideas, I would be very grateful.

Thanks!

-Sean Kennedy
Eclitpta, Inc.

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