from looking at the OS source for ResLoadForm (called by FrmInitForm), file
"HwrRes.c" line 85, there's an obvious low-memory bug.  it allocates memory
but does not check for null.  so if there's not enough memory, you'll get a
priviledge violation trying to dereference null.  check and see if the
emulated device is nearly full (after 905k gremlins that's not hard to
believe).

this is the second pretty obvious low-memory bug that's been found in a
couple weeks, so i'm sure the Palm guys are going to do a code review of all
the OS code looking for low-memory bugs like this.  or maybe they've already
done so.  unless they release a patch, it won't help anyone with existing
devices, though.



----- Original Message -----
From: Andrew Ball <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 08, 1999 11:25 AM
Subject: Obtaining info from a list on another form


> I'm in CurrentFORM and I want to get the text from a list
(MyOtherFORMList)
> in MyOtherFORM.  MyOtherFORM isn't loaded so I've got to
>
> - load the form,
> - get a pointer to the list,
> - get a pointer to the listtext,
> - copy the text,
> - unload the form
>
> At least, that's what I *think* I should be doing. ;-)
>
> I'm using:
>
> static void DisplayListItem( void )
> {
>     FormPtr frm;
>
>     char pListStr[ MAX_TZ_LENGTH ];
>
>     Int len;
>
>     // Find the OTHER form
>
> /**** PROBLEM HERE ****/
>     frm = FrmInitForm( MyOtherFORMForm );
> .........
>
>
> The FrmInitForm() failed in the high gremlins (~950K).
>
> Given that I'm loading a form that isn't active, should I be allocating
> memory to hold MyOtherFORM explicitly while I'm examining the contents of
> the list?  If so, how (MemPtrNew?) ?  Examples?  Suggestions?


Reply via email to