From: "Curtis" <[EMAIL PROTECTED]> > What kind of things could cause my 68K app (developed > w/ PODS 1.1, multi-section) to run fine when compiled as > Debug, but not as Release? > Often this is a sign of memory corruption, unitialised pointers, use of freed memory, etc. These problems can be masked in debug builds because the debugger framework alters the way the code works. An example is an uninitialised pointer that writes to a random address. In the debug build this location might be just inside a 'safe' area of memory. The release build has slightly different code sizes and this wild pointer then writes to a slightly different location, possibly producing a completely different result. Bugs relating to the stack will also often run differently in release builds because debug builds sometimes do better stack cleanup or handle function calls slightly differently.
I haven't used PODS so I don't know what sort of memory debugging is available, but I'd check all warnings and do all the memory testing possible. If your app will run under Palm OS 4 you could run it on the emulator, which carried out significant testing behind the scenes (the simulator, on the other hand, seems to be just a repackaging of the standard Palm OS runtime and therefore is significantly less useful for debugging). You're going to have to do some time-consuming checking: - every variable needs to be initialised before use, - every pointer must be tested before use, - every pointer must be set to NULL when released but then code review is always a good thing. > First, a label whose text gets set with FrmCopyLabel() gets > random characters of garbage instead of the intended string. > Suggesting that the source pointer has been corrupted or is invalid. Pretty vague, huh? Trace back to where that value comes from and what compiler settings might alter or affect that. > Also, when a menu item is clicked and it opens a modal > dialog, the dialog seems to behave normally, but when it's > closed, the app restarts like when it's first launched. > Not sure what's happening here. Are you sure that your startup logic is running, or is your initial form just re-displaying? What can help with this sort of problem is a simple logging system. Write a couple of functions that create a database and then write strings to it. Use these to log what's happening in your code. It's a slow way to debug, but can be the only way to trace this sort of problem. Chris Tutty -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
