At 12:02am -0700 01-04-30, Palm Developer Forum digest wrote:
>Subject: Bug in FrmRemoveObject(), or my error?
>From: Curtis Jackson <[EMAIL PROTECTED]>
>Date: Sun, 29 Apr 2001 09:04:14 -0700
>X-Message-Number: 13
>
>I have a program on a Visor Prism that dynamically creates a label
>resource, then ends up removing it again without ever having actually drawn
>it. Whenever I attempt the remove, however, I get a fatal error saying that
>I have accessed an odd address. I can't find a bug database at palmos.com,
>nor do I know where to report this, but I'm sure someone will enlighten me.
[snip]
I'd run into similar bugs w/FrmRemoveObject() on a Visor with 3.5
ROMs. Looking at their ROM code, it turns out they've got a patch on
this routine. The patch appears to fix some of the known problems
with Palm OS 3.5's version of this routine, but it seems to introduce
new bugs.
The specific problem I see is that their patch code first removes the
object, then calls a routine to fix up pointers, and _then_ updates
the form object count. So the pointer fixup routine winds up treating
the data for the first object in the form as a FormObjectType record.
I was OK when the first object in the form was a normal title, since
the data for the title (the text) didn't look like any known form
object type. When I inserted some special bytes at the start of the
title, though, suddenly the title looked like a field object in the
form, and I got address errors as the fixup code tried to adjust a
bogus text pointer.
-- Ken
Ken Krugler
TransPac Software, Inc.
<http://www.transpac.com>
+1 530-470-9200
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/