My initial post was not clear at all (it *was* late).  If an exception
is thrown, the handler seems to typically either display a message or
just reset the device.  But, my spelunking seemed to reveal that some of
the display stuff, and other OS services, are not re-enterable - ie,
they use global variables.

I (accidentally) poked some garbage into a graphic header inside AvantGo
with my crude monitor, just prior to a call to the Win Manager.  The
system froze.  When I traced it, it appeared I was causing a divide by
zero error (reasonable), but instead of just resetting, the system was
trying to call SysDisplayFatalblahblah, and dying there.

Even SysReset... seems to do some global variable checking and
branching.  Though I never confirmed if I could create a case were it
hung instead of resetting the system.

My point was that the 'some variable' (which decides rather to display,
or just reset) doesn't seem to always work, it also seems possible to
hang the system if you cause an exception inside some of the
non-reentrant systems in the OS.

I'm not saying it is a big bug(s), but I have seen this kind of behavior
(just frozen) using different apps on my PalmPro and IIIx.  It seems
reasonable that the apps in question could be doing something to cause
an exception, and the exception handling code is locking up, instead of
just resetting the unit.  Of course, the app could just be executing
'while (1);'<grin>.

I can't speak for anyone else, but I usually see these lockups just as
someone is about to give me something important to type in - and I don't
have a paperclip <grin>...  In other words, as a developer, I like
exception information.  As A user, I wish the thing would just reset if
the app crashes with divide-by-zero, a bus error, etc.

Hope that is clearer, I've had more sleep...

-jjf

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 06, 2000 6:34 PM
To: Palm Developer Forum
Subject: Re: A bug in Trap #F code?

[Snip]

The first few lines of *what* trap?  The code you're displaying is the
code that
gets executed when an unexpected exception occurs.


> trap #F: SysFatalAlert ; ???? Won't this recurse until the stack
explodes if
>         ; trap #F got us here in the first place?
> <reset>:
> trap #F: SysReset ; ???? And this as well?


Trap #$F doesn't take you to that section of code.  Trap #$F is handled
by
another function.  So there's no recursion.

[Snip]

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to