> When running on extremally low storage memory (we rely on that memory > heavily) I found several examples of crashes that I believe can be > attributed to the Palm OS.
welcome :) just wait until you try to start doing dynamic forms with low memory conditions. one of the side effects was that it would remove other buttons/controls on the form - in conditions where heaps of memory is available, it runs like a charm :) > The most clear proof represent following consecutive lines: > > stdDib = MemPtrNew( sizeof( StdDib) ); > if( stdDib != NULL ) > MemSet( stdDib, sizeof( StdDib ), 0 ); > > The emulator claims the pointer passed to MemSet is an unallocated > chunk of memory. That chunk really points to a block that was in this > sequence allocated (and later released) a little bit earlier. this one it should catch. if MemPtrNew() fails, it should return NULL > Another time MenuHandleEvent() crashed (also on memory problem) > without app code being involved at all. > Or again inside FrmCustomAlert(). (In PrvChunkNew().) that happened to me a couple of times - the OS code is not 100% bug free/error checked :) as much as palm/palmsource want to say it is, it just isn't :) > The above problems appeared on Emulator 3.5 running on m515 release > rom, but they seem to appear on real devices, too. (Although I did > not come that close yet.) > > Does anyone know how to prevent such situations? the only way to prevent such situations is to a) dont use as much memory [not an option] b) do not depend on the OS API's in low memory conditions b) being a bit more serious, normally means write your own routines that can handle failures etc. thats what we had to do in a project i was working on. --- Aaron Ardiri [EMAIL PROTECTED] CEO - CTO +46 70 656 1143 Mobile Wizardry http://www.mobilewizardry.com/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
