We have been having intermittent problems with the handheld crashing with the error "Preferences.c, Line: 271, Pref DB Open Error" during the HotSync operation when our conduit is running.
We cannot force a crash at will, but it does happen on a regular basis. As far as I know, the error has only occurred with Tungsten T3s (patched and unpatched). But, that could be because most of the devices in the program are T3s, so the conduit just doesn't get used enough with other device types. The conduit is supposed to download databases and files from a server and install them to the handheld's memory or to a VFS volume. As part of its operation, the conduit checks for free space on the VFS volume before downloading anything, and it also checks that the correct volume is mounted by reading a special hidden file on the card. We keep detailed logs of what the conduit is doing, so we have a pretty good idea of where the crash happens. At first, we thought the error occurred when calling the CDK's VFSVolumeSize() function. So, we changed the conduit to get volume's size via an RPC to our handheld app (which of course still has to call the PalmOS VFS Manager's VFSVolumeSize function). When this didn't work, we tried skipping the calls to VFSVolumeSize(). That just moved the problem so that it would happen after calling a different VFS function, such as VFSFileOpen() or VFSFileRead(), which we use to identify the mounted volume. So far, I've only seen it happen after calling VFS-related functions. I'm pretty sure that this is a PalmOS bug, but it would be really helpful to know why VFS functions seem to need to use the Preferences Manager. It would be even more helpful if anybody could suggest a workaround so that whatever is tickling the bug could be avoided. FWIW, our typical conduit flow as it applies to VFS is: VFSSupport() VFSVolumeEnumerate() (with a null buffer) VFSVolumeEnumerate() (with room for the volume list) VFSVolumeSize() (once for each enumerated volume) VFSFileOpen() VFSFileRead() VFSFileClose() (this sequence called for each volume) Then, potentially, the conduit will be calling more VFSFile* functions if it needs to install something, but it never gets that far because the handheld has already crashed on the VFSVolumeSize or VFSFileOpen function. -- Dave Carrigan Seattle, WA, USA [EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680 UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL Dave is currently listening to The Rainmakers - Downstream (The Rainmakers) -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
