At 1:20 AM +0200 04/27/00, D. DeVecchio wrote:
>I have stared at the stack trace for hours.  In the end though it is
>just a bunch of numbers.  I have no idea what the numbers are supposd to
>be.  Do you know of something I can compare them to in order to check
>for validity?

Well, you need to learn what the numbers are!

Addresses (in the Ax register) are usually pointers to some structure,
typically in the dynamic heap.

To see how the dynamic heap is using memory, do a "hd 0" in PalmDebugger.
This dumps a summary of all the chunks in the heap, along with their start
addresses and sizes.  Now look at the address that's causing the bus error.
You can quickly find out which chunk it's pointing to... what is that
chunk?  If it's your application globals, then it's probably the stack.
Has it overflowed? Yes if the address is out of the range of the chunk.

It could also be some kind of stack corruption.  Say you allocate a buffer
of 20 character on the stack, but then write 30 characters into it.  You've
just trashed the next 10 bytes, which could be some other variable... if
that variable held a pointer, you now have a pointer to something random,
and that's very likely to bus error.

Good luck tracking this down.  Trashed memory is about the hardest thing to
debug...

                                --Bob



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to