I'm getting a strange error from the emulator that I haven't seen before. Does anybody know what I might be doing at the application level to cause this?

"... just changed emulated program counter to ___. This address is invalid because it is not even". And indeed, the address ends in 'f'.

This is really odd :)

Thanks,
</edg>

Here's the function:

MemHandle PvtGetPrefEntry(UInt32 appFileCreator, UInt16 appPrefID, Boolean saved)
{
UInt16 uwPrefLength = 0;
Int16 wPrefReturnValue;
MemHandle h;
MemPtr p;


wPrefReturnValue=
PrefGetAppPreferences(appFileCreator, appPrefID, NULL, &uwPrefLength, saved);

if((uwPrefLength) && (wPrefReturnValue != noPreferenceFound)) {
ErrFatalDisplayIf(((h=MemHandleNew(uwPrefLength))==0),
"Cannot allocate memory");
ErrFatalDisplayIf(((p=MemHandleLock(h)) == NULL),
"Cannot lock memory");

if (PrefGetAppPreferences(appFileCreator, appPrefID,
&p, &uwPrefLength, saved) != noPreferenceFound) {

MemHandleUnlock(h);
return h;

} else {
MemHandleUnlock(h);
MemHandleFree(h);
return 0;
}

}
return 0;
}

This happens on the SECOND call to PvtGetPrefEntry:


hUserID = PvtGetPrefEntry(appFileCreator, prefUserID, true); // this one succeeds
hServer = PvtGetPrefEntry(appFileCreator, prefServer, true); // this one fails
hPassword = PvtGetPrefEntry(appFileCreator, prefPassword, false);



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

Reply via email to