Hey all,

I run an app from an SD card. To make sure it gets deleted after running it 
(specifically: after it crashed or I reset the device while it runs), I want to set 
the recyclable bit of the app database. The device in question is a Tungsten T3.

Problem is: doing so makes the app crash when I close it down. I traced the bug - it 
happens after AppStop is executed, so it's in the PalmOS cleanup code. It's quite 
fatal, I have to do a pen reset. The text in the popup that appears at the crash is 
"MemoryMgr.c, Line 3651, Free handle". If I 'comment out' the following line:

err = DmSetDatabaseInfo(cardNo, dbId, 0, &attributes, 0, 0, 0, 0, 0, 0, 0, 0, 0); 

...the crash doesn't happen.

- attributes is a UInt16; I got it's value through a call to DmDatabaseInfo and or-ed 
it with dmHdrAttrRecyclable)
- dbId, I got through a call to DmFindDatabase, where I just assumed cardNo to be 0. I 
also tried SysCurAppDatabase, this made no difference.

This all happens in (a function that is called from) AppStart.

Does anybody have any clue what might be going wrong?

Thanks, regards,

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

Reply via email to