At 12:38 PM -0400 10/7/02, Brian Smith wrote:
>I'm working on a project that will be making heavy use of dynamically
>created fields in a form.  When using FldNewField, it seems to work
>properly with release ROMs, but with a debug ROM I get a ton of
>unallocated chunk errors when the OS is trying to use the form pointer.
>
>I know that FldNewField reallocates the form structure to accomodate the
>new field, and that the form pointer going in may not be the same after
>the function is called.  Is POSE not accounting for this, or is there
>possibly another problem somewhere else?

It's probably more likely that it's your application that's not taking the pointer 
change into account.  If you have a pointer to a form in one part of your program, and 
in another part of the program changes the form, then that first pointer would have be 
be updated with the new pointer.

With regards to detecting access to unallocated chunks, Poser doesn't really maintain 
any state that needs to be updated after a FldNewField call.  Any time the state of 
the Palm OS's dynamic heap changes, Poser goes and collects information about it.  
Then on any memory access, Poser checks the access against its snapshot of the heap.  
This is a very low-level operation, well below something like FldNewField, and so is 
not sensitive to form-changing operations.  That's why I think it more likely that the 
problem is not in Poser but in your application.

Of course, you're in a better position than anyone to tell for sure.  What do you find 
out when you click on the Debug button in the error dialog?  What's making the access 
and why?

-- Keith Rollin
-- Palm OS Emulator engineer

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

Reply via email to