> This is quite similar  to what we are facing in our application ported to
OS
> 5.0 . Please anybody from the Palm OS developers have any idea what's
> happening behind the scenes ??

My guess is that your application trashes the heap. You probably overwrite
some memory management information, which makes the OS crashes later when it
tries to allocate, resize, or free a chunk. These kinds of bug are difficult
to track down, because the line that triggers the fatal alert can be very
far away from the line that causes heap corruption.

The memory manager internals having been rewritten from ground up between OS
4 and OS 5, the format of this memory management information has probably
changed. This can explain why your application only crashes on OS 5, IMHO.

Some clues:

- Check that all of your pointers always point to valid memory.
- Check that your buffers are wide enough (a common mistake is to forget to
reserve memory space to hold the terminating null char of strings).
- Check that you never access arrays using subscript out of bounds.
- Check that you pass valid parameters to MemMove.
- Check your pointer arithmetic, especially when applied to types that are
not 1 byte wide. This can be confusing, sometimes.

Good luck.

Pascal




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

Reply via email to