Crash Setup:
Windows NT4 workstation
POSE 3.0a8 and PalmOS40dr4-efigs-v-fulldbg.ROM
HostFS.PRC dr4 installed with 1 volume mounted
CW6 log window:
Process Created: address=0x4ea14
size=0xf0be
cardID=0
dbID=0x403af
Address error exception at 0x490f4 (PrvFindMountedVolume)
Call stack:
...
PilotMain
StartApplication
GetCurrentCard
(VFSGetDefaultDirectory)
(VFSVolumeInfo)
(FSVolumeInfo)
(PrvFindMountedVolume)
Code fragment that causes crash: from GetCurrentCard()
UInt16 cardNumber = 0;
Err err;
UInt32 vfsMgrVersion;
UInt32 expectedVFSMgrVersionNum = 200;
err = FtrGet( sysFileCVFSMgr,
vfsFtrIDVersion, &vfsMgrVersion );
if ( !err ) {
// VFS Manager installed, check version number of VFS Manager
if ( vfsMgrVersion >= expectedVFSMgrVersionNum ) {
UInt16 volRefNum;
UInt32 volIterator = vfsIteratorStart;
while ( volIterator != vfsIteratorStop ) {
if (( err = VFSVolumeEnumerate( &volRefNum,
&volIterator)) == errNone )
// Doc defect line
{
// Find any .PRC files on the volRefNum
Char pathStr[256]; // full path = 256
chars
UInt16 bufLen = sizeof( pathStr );
MemSet( pathStr, bufLen, 0 );
err = VFSGetDefaultDirectory( volRefNum,
".PRC",
pathStr,
&bufLen );
if ( !err ) {
// Found a volume in the VFS with
.PRC file(s)
cardNumber = volRefNum;
}
} else {
// handle error... possibly by
// breaking out of the loop
break;
}
}
}
}
VFS Docs defect:
Palm OS Reference PDF (part of dr4 SDK) page 900
comparison should read as EQUAL to errNone
...
while (volIterator != vfsIteratorStop) {
if ((err = VFSVolumeEnumerate(&volRefNum,
&volIterator)) == errNone) {
My intent was to prepare for when new Palm devices are released with various
interfaces available by either
the new Expansion Manager or Virtual File System Manager APIs
especially making sure the code is ready to run on Palms with Card 1 or
other combinations.
Setup above allows me to detect the Expansion Manager but get an error when
ExpInit() was called.
Code above allows me to detect VFS Manager but get a crash on POSE when
trying to get more data...
Any suggestions on:
Setting up/testing/degugging a Card 1 example using POSE and CW6?
Thanks,
Randy Maxwell
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/