Ben Combee,
Two responses in a many hours. Wow. Lucky day. more than I have had
in a month. Thanks for getting back to me.
On Wed, 26 Apr 2000 15:14:53 -0500, you said:
>
> I've tracked down a few of these. One way to get a better idea about the
> cause is to look at the stack trace in the debugger window and go back until
> you can find a part of your program.
Bob Ebert suggested the Stack trace just a few minutes ago. Is there
something I am missing? All I get in that is a bunch of numbers. of
course I can scroll up to find the calls in my own program, but it only
ends up pointing to the call (in my program) that lead to the crash. I
know which one it is, because I just stepped into it with the debugger.
It seems like there some very important thing I am overlooking here.
Does this window actually provide useful information about the stack
other than the list of function calls?
> If it is a event handler, look at the
> event structure.
Just before the crash, the event structure or whatever variable I am
passing to the API, is in good order. If I use the debugger to step
over an API function call I get the "read to unallocated chunk" error
from the emulator. Pressing "debug" takes me back to the debugger and
now the variable (a pointer usually) is messed up. The data that the
pointer used to point to is still valid, but the pointer is now
incorrect. Presumably this is the cause of my problems. Under what
circumstances would an API function re-direct a passed pointer to an
invalid chunk????
> (The documentation for FldGetTextPtr should indicate that the locked string
> it returns shouldn't be unlocked by user code, in my opinion).
I figured that one out the hard way too.
If you ever set the handle, make sure it is not locked when you set it,
or you will get an "improperly locked" error when you pass the null
parameter to prevent it from being deleted when the form closes.
>
> Also, make sure you have all the warnings on in your CodeWarrior project.
> The compiler has saved me several times, especially with its "uninitialized
> variable used" errors.
Yep. That is for sure.
derik
email: [EMAIL PROTECTED]
WWW: http://www.pobox.com/~derik
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html