At 1:57 PM -0700 5/3/02, Joe wrote:
>--- MedCalc <[EMAIL PROTECTED]> wrote:
>>  The following code snippet makes the Palm OS 5 simulator
>>  crash when performing a search:
>>
>>  case sysAppLaunchCmdFind:
>  >     if (PrefGetAppPreferences(appFileCreator, appPrefID, &tempPrefs,
>  > &prefsSize, true) != noPreferenceFound)
>>      {
>>      if (tempPrefs.includeInGlobalFind) SearchDB
>>  ((FindParamsPtr)cmdPBP);
>>      }
>>  break;
>>
>
>Are you using any global variables?  (appFileCreator, appPrefID, etc.)
>Globals aren't available during most launch codes.

True, but hopefully the simulator would tell you that instead of just 
crashing!  :-)

At any rate, "MT" clearly shows that tempPrefs and prefsSize are 
local variables.  And things like appFileCreator and appPrefID are 
typically #defines.  So I think that fishing for the "globals" reason 
is not likely to produce an answer.

Instead, my bet is with the fact that prefsSize appears to not be 
initialized before calling PrefGetAppPreferences.

-- Keith

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

Reply via email to