I have a program that reads data from a PRC database. It works fine when that PRC database is external to itself.
But when I try to open and read from my current (running) PRC, everything works fine until I exit. I then get a fatal memory manager error saying only "Chunk Underlocked, but with no additional info".
In debugging this with the debug console, it appears that my App has fully exited by this point, and the error is in the system.
Interestingly enough, it MAKES NO DIFFERENCE in my app if I choose to not close the database at all before exiting, or even if I close it twice!
I assume there is some logical issue with the fact that I've opened my App for reading, and so has the OS.
Is there a way to make this work?
Hmmm... you're using a multi-segment app, right?
I'm wondering if the code that unlocks the other code resources in the CW runtime could be getting the code resources from your other app by mistake.
The loop in the runtime is very simple:
while (smp->codesize)
{
if ((codeH = DmGet1Resource(sysResTAppCode, codeID)) != NULL)
{
MemHandleUnlock(codeH);
}
smp++;
codeID++;
}If your other app database is still open, this will produce the error you state.
--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
