I think I have found another bug with the NVFS implementation on the
T5. It appears that if you routinely read large amounts of data from a
database, you will end up corrupting the NVFS cache, which causes memory
errors when you try to query a record, and eventually crashes the
device.
In my tests, I first created a large database -- 2500 records ranging from
10-20k in size, for a total of around 35MB. I then went in a loop doing:
for (;;)
for (UInt16 i = 0; i < DmNumRecords(db); ++i) {
MemHandle rec(DmQueryRecord(db, i));
while (rec == NULL) {
// Display result of DmGetLastErr()
rec = DmQueryRecord(db, i);
}
UInt8* buf(new UInt8[MemHandleSize(rec)]);
MemMove(buf, MemHandleLock(rec), MemHandleSize(rec));
delete[] buf;
MemHandleUnlock(rec);
}
}
Here are my results:
Try no. 1: on the first pass, it got to record 1718, then gave me a Fatal
Alert: "Preferences.c, Line: 264, Pref DB Open Error" and I had to reset
the device with a paper clip.
Try no. 2: on the first pass, it got to record 1614, then DmQueryRecord
returned error 513 (dmErrMemError) when it tried to read the next
record, then it gave me a Fatal Exception with no text, and I had to
reset the device with a paper clip.
Try no. 3: on the first pass, DmQueryRecord returned error 513
(dmErrMemError) on record 1890 four times, then was actually able to
read the record. It continued to record 1967, where I got another error
513 (twice), then again on record 2198, where I got another error 513
(five times) and finally it finished. On the second pass, DmQueryRecord
returned error 513 on records 129 (x2), 992 (x1), 1079 (x1), 1110 (x1),
1238 (x1), 1478 (x1), 2428 (x2). On the third pass, DmQueryRecord
returned error 513 on record 9. I tapped the house to exit the
application and got a Fatal Alert: "VFSDBCache.c, Line: 6731,
CloseRecord() had problems reloading a record.", and I had to reset the
device with a paper clip.
On try no. 4 and 5, I got error 513 on records 1842 and 2436, respectively,
then got a Fatal Exception with no text and had to reset the device.
If you would like to see my test program and try to duplicate my results,
send me private email.
--
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
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/