I was able to stop the peculiar crash on second entry by removing
everything from StopApplication(), and by removing a call to
PrefGetAppPreferences() in StartApplication(). The preferences
code wasn't doing anything yet anyhow, but I'm concerned that
my StopApplication() clean up code is now gone.
Is it normal practice to avoid cleaning up when a Palm program
exits? And are the preferences functions known to have unusual
hazards?
>From StartApplication:
#if 0
// Read the saved preferences / saved-state information.
prefsSize = sizeof(StarterPreferenceType);
if (PrefGetAppPreferences(appFileCreator, appPrefID, &prefs, &prefsSize,
true) !=
noPreferenceFound)
{
}
#endif // 0
>From StopApplication:
static void StopApplication(void)
{
#if 0
StarterPreferenceType prefs;
// Write the saved preferences / saved-state information. This data
// will be backed up during a HotSync.
PrefSetAppPreferences (appFileCreator, appPrefID, appPrefVersionNum,
&prefs, sizeof (prefs), true);
FrmCloseAllForms();
if (pSessionID)
{
MemPtrFree ( pSessionID );
pSessionID = NULL;
}
if (pConfig)
{
MemPtrFree ( pConfig );
pConfig = NULL;
}
if (pConfigDB)
{
DmCloseDatabase((DmOpenRef) pConfigDB);
pConfigDB = NULL;
}
if (pSessionDB)
DmCloseDatabase((DmOpenRef) pSessionDB);
pSessionDB = NULL;
}
#endif // 0
}
Greg Bungo
[EMAIL PROTECTED]
(630)949-3250 voice
(630)949-3299 fax