Thanks, Ben.

I made sure I had the "return Errnone;" in PilotMain, but still got the same 
problem.

I don't know why you got me thinking in the proper direction, however, but I 
noticed previously if I eliminated the VFSFileDBGetRecord loop and just left 
the part where the directory is enumerated (VFSDirEntryEnumerate), my routine 
would find all the files in that directory and the program would not crash on 
exit. I knew therefore that something in the GetRecord loop was causing the 
crash. After your reply I tried eliminating something else in the GetRecord 
loop to see if it was causing the crash. In addition to MemhandleLock for the 
handle returned from VFSFileDBGetRecord, I was also using MemHandleNew to 
create a new buffer in which to copy a modified version of the returned record.

I removed the MemHandleNew and that prevented the crash. Using a Char array 
instead does me for now, but I still don't know why the second buffer was 
causing a problem (yes I was doing memHandleFree on that buffer also).

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

Reply via email to