yes, i thought about it too, but so far everytime i found bug in palmos or
emulator at the end i found it was caused by mistake in my code so....

i don't handle unknown ctlselect or ctlenter events in my code at all.

i always use
switch(eventP->eType)
{
        case mycontrol1:
                ...
                handled=true;
                break;

        case mycontrol2:
                ...
                handled=true;
                break;

        default:
                handled=false;
                break;
}
...

the crash happens when unhandled event goes to frmdispatchevent (or its
equivalent in frmdodialog). so i am able to workaround it with catching
ctlselect and ctlenter events on control with this id and doing nothing for
them. i only think that this is extremely ugly, because it workarounds the crash
but doesn't fix the cause :-(
                


Tam Hanna wrote:
> Hi,
> People, beat me, but I believe that this may be a possible approach:
> The gremlins themselves are also a PalmOS thingy (addon), so it is entirely
> possible that they are the cause of the entire problem.
> As it looks right now, the program READS from a memory location x, but does
> not write to it! So, it should not be a real problem on a release ROM if you
> ask me!
> Last but not least, please check your ctlSelectEvent handler/event handlers
> how it acts if a random control ID is passed to it. Is some ID computation
> done(like getting a selection)? Is a pointer fetched?
> Best regards
> Tam Hanna
> http://www.tamoggemon.com
> 
> 
> Subject: mystery of control with id 11603
> From: Michal Seliga <[EMAIL PROTECTED]>
> Date: Wed, 07 Sep 2005 18:57:57 +0200
> X-Message-Number: 13
> 
> i am often receiving this error in emulator (with debug rom from m515)
> 
> 195.200 (3213):       <-  EvtGetEvent: ctlSelectEvent  ID: 11603   On: 0
> 195.200 (3213):       === WARNING:
> ****************************************************************************
> ****
> 195.200 (3213):       === WARNING: Hamilton (unknown version) just read from
> memory
> location 0x000148E2, which is in an unallocated chunk of memory.
> 
> An "unallocated chunk of memory" is a chunk of memory that has not been
> reserved
> for use by the application through calling MemPtrNew or MemHandleNew. It
> should
> not be accessed by applications under any circumstances. Such an access
> usually
> means that an application is accessing a chunk that used to be allocated to
> the
> application but has since been returned with MemPtrFree or MemHandleFree.
> 195.200 (3213):       === WARNING:
> ****************************************************************************
> ****
> 
> 
> unfortunately i don't have control with such id in my resources. it must be
> something in system, but what? and what should i do to get rid of these
> crashes?
> i can't invoke them, only with gremlins, but for them its only matter of
> time. i
> am afraid that on real device it will do very ugly things
> 
> 
> it seems that it happens only if i have progress manager dialog running (i
> close
> it with PrgStopDialog(progress,false); and depending on result of operation
> i
> show my own alert dialog with text and OK button. gremlins seem to get this
> crash in FrmDoDialog. strange thing is that when i test it myself i can't
> crash
> it. gremlins can.... so i am afraid that users will find it too
> 
> i really i don't know what to debug it.... i need some hint...
> 
> thanks in advance
> M.
> 
> 

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

Reply via email to