Greetings,

I haven't found any references to this in the forum archives, but I've recently 
come across a rather serious NVFS bug in Palm OS 5.4.9. It may have been 
present in earlier releases too, but for whatever reason the updated caching 
system in 5.4.9 seems to have made it a lot worse.

The bug is that the busy flag for database records can sometimes be left set 
after a soft reset. Specifically, this happens if you call DmSyncDatabase while 
the database is open and the record is busy, and then for whatever reason (most 
often a drained battery) perform a soft reset before the database is closed and 
the record released; subsequent attempts to access the record will result in a 
dmErrRecordBusy even though the record hasn't been accessed since the Palm was 
reset. So it seems like the busy flag is being saved out to flash memory along 
with the updated record data, and is not being cleared on a soft reset as it 
would be on a RAM-based PDA.

My current workaround is to call DmReleaseRecord to clear the busy flag 
whenever I encounter a dmErrRecordBusy, but that doesn't seem like very good 
programming practice, since there's no way to tell whether the database is busy 
because of this bug or because another program actually is using it. I imagine 
this could also be fixed by simply releasing all records before calling 
DmSyncDatabase, but that seems like it might cause a significant performance 
hit, and at a minimum would involve writing a lot of new code to carefully 
reopen all of the records that were released prior to syncing the database.

Does anyone have any other ideas for how to fix this? Can anyone at Palm 
comment on whether or not this is a known bug and likely to be fixed in a 
future OS update?

Thanks,

Michael Love
Pleco Software

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

Reply via email to