Also of interest is where, precisely, in the call stack is the error
happening. If you re-create the failure while the application is running
under a debugger, you should be able to answer this question. Knowing which
routing accesses an unallocated chunk might be a great indicator of which
chunk has been unexpectedly released.
I.e., if Dane's (quite reasonable) supposition is correct, it would be
FldHandleEvent.
By the way, if you do (for whatever reason) wish to free a field's text
handle, you should give the field a NULL text handle. Fields are bright
enough (barely) to know that if their text handle is NULL, they shouldn't
free it...
-bob mckenzie
-----Original Message-----
From: Avilla, Dane [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 8:46 AM
To: Palm Developer Forum
Subject: RE: form deletion
> . . . FrmGotoForm is called on a
> ctlSelectEvent, and then the handler releases the current record,
> resets some field text handles to NULL and unlocks some chunks
> in response to a frmCloseEvent, it then returns false to allow
> the system cleaning the form. However this doesn't happen for
> some obscure reason.
>
> When forcing the erasure and deletion of the form on a
> frmCloseEvent, it generates an error message saying that the
> system is reading from an unallocated memory chunk.
Hmmm . . . You shouldn't have to release the field text handles . . . The OS
should do this itself. That could be the problem: the OS may be trying to
free up field text handles after you have already freed them. Try taking
out your code that frees up the field text handles in frmCloseEvent and see
if that helps. The OS should clean up any allocated memory handles attached
to fields when it disposes of the form. You shouldn't have to do it
yourself.
Cheers,
-DGA
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/