Hello all...
 
I am experiencing fatal exceptions after my application is
relaunched after receiving beamed data. This only happens
if my application is the active one when the beamed
data arrives.  It only happens on PalmOS 3.5 devices and
the emulator ("Window.c, Line 3826, Bad window") but I
think the problem is there in earlier ROM versions also,
it just isn't croaking.
 
The problem does not happen until after the app is re-launched
with the sysAppLaunchCmdGoTo launch code.  The way beaming
works is in two phases:
 
1) the app gets a sysAppLaunchCmdExgReceiveData to let it
know that there is beamed data for it.  It goes and reads
the data and sets up a structure with information like
the database, record number, and type of data and then
exits.
 
2) then the OS launches my app with the sysAppLaunchCmdGoTo
launch code and the pointer the the above-mentioned structure
as the parameter control block (2nd param to PilotMain).
I look at the structure and call the right form with the
right data.
 
It gets through the first phase fine and even launches the
correct form with the right data.  All is hunkey-dory until
exiting that form.  Then it dies with the window issues.
Stepping through the code with emulator/debugger shows that
it goes into FrmDoDialog but never returns from it.
 
One other piece of information: I tried calling FrmCloseAllForms
in AppStop to see if that would help but that just caused many,
many memory errors before my app even exited.  The errors
were accessing invalid chunk pointers, and reading/writing to/from
unallocated memory.
 
Any ideas on why I'm dying in FrmDoDialog?
Any ideas on why calling FrmCloseAllForms would uncover memory
problems in the emulator?
Are these two related?
 
Many thanks...
 
Adrian.

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

Reply via email to