> In the Stack frame I see a series of calls. The last two are:
> 0x200010C1(<unknown>)
> 0x10C72E38( TargetCfgRoutines )

Ah...you have an interesting edge case here.  The stack overflow is being caused
by an interrupt.  That is, you personally haven't used up all of the stack, but
you've left so little that if an interrupt were to occur (as it is here), the
act of processing the interrupt by the OS overflows the stack.

How do I know this?  Experience and a couple of clues.  The first clue is the
function at the bottom of the stack.  TargetCfgRoutines is the entry point for
all interrupt routine handlers.  The second clue is the address of the
"function" above it.  0x200010C1 is not a valid address.  Rather, it is the
combination of the saved CPU status register and the upper two bytes of the
function that was executing when the interrupt occured.  CodeWarrior's stack
crawling mechanism apparently isn't prepared to recognize that condition and
allow for it.

Since the stack crawling mechanism is now out of sync, I'm guessing that the
remaining functions listed in the stack crawl pane make little or no sense.  In
that case, you have two options:

* Make the stack size a little smaller and run your application again. See:

     <http://oasis.palm.com/dev/kb/faq/1214.cfm>

By making your stack a little smaller, your will overflow the stack instead of
the interrupt routine.  You can then find out what's filling up the stack.

* Generate a stack crawl by hand.  This *can* be done, but if you don't know how
to do it, then it would probably take me too long to explain it here.

By the way, the emulator usually warns when the application is getting close to
overflowing the stack (within 50 bytes of the end).  I wonder why you're not
seeing that warning.  If you were to enter the debugger then, you'd probably see
a fuller stack crawl and have a better idea why you're filling up the stack.

-- Keith Rollin
-- Palm OS Emulator engineer







"Mitch Fawcett" <[EMAIL PROTECTED]> on 12/18/2000 08:17:10 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

Sent by:  "Mitch Fawcett" <[EMAIL PROTECTED]>


To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (Keith Rollin/US/PALM)
Subject:  RE: Stack Overflow on Reset



When I click the Debug button I get the following in the PalmOS Device
Console window:
Initializing parser...
Initializing lex...
Installing keywords...
Initializing eval...
Initializing exec...
CmdGetRemoteRtnName error: ILLEGAL ADDRESS
CmdReceiveMessagePacket: the received packet is not a message or state
response packet.


In the Log window I see:
Process Created: address=0x5ea94
 size=0xacbc
 cardID=0
 dbID=0x2027f
Bus error exception at 0x10c4681e (CtlGetLabel) <-- I'm investigating this
now.
Process Created: address=0x5ea94
 size=0xacbc
 cardID=0
 dbID=0x2027f


In the Stack frame I see a series of calls. The last two are:
0x200010C1(<unknown>)
0x10C72E38( TargetCfgRoutines )


When I highlight the 0x200010C1(<unknown>) entry I see a long series of
entries in the Source frame that look similar to this:
200010C1: FFFF            dc.w     0xffff


When I highlight the 0x10C72E38( TargetCfgRoutines ) line, the first line in
the Source frame is:
10C72E38: 48E7E0C0        movem.l  d0-d2/a0-a1,-(a7)

Mitch

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Monday, December 18, 2000 9:58 PM
> To: Palm Developer Forum
> Subject: Re: Stack Overflow on Reset
>
>
>
>
> > Normally I would set some breakpoints and gradually narrow down the
> > source of the problem...Any suggestions?
>
> When you get the error dialog, why aren't you clicking on the
> Debug button and
> seeing precisely where the error is occuring?
>
> -- Keith Rollin
> -- Palm OS Emulator engineer
>
>
>
>
>
>
> "Mitch Fawcett" <[EMAIL PROTECTED]> on 12/18/2000 06:58:04 PM
>
> Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>
>
> Sent by:  "Mitch Fawcett" <[EMAIL PROTECTED]>
>
>
> To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
> cc:    (Keith Rollin/US/PALM)
> Subject:  Stack Overflow on Reset
>
>
>
> I'm hoping someone can offer me help on a problem that I'll admit is a bit
> vague.
>
> What has happened is, out of the blue, whenever I reset Poser I
> get an error
> message that I have just overflowed the stack. Admittedly there
> is a bug in
> my program, because I don't get the error after I delete my app
> from Poser.
> Normally I would set some breakpoints and gradually narrow down the source
> of the problem. The problem is, no matter where I set my breakpoint, it
> doesn't get encountered during the reset process. I've tried various lines
> in Start, Stop, PilotMain... no luck.
>
> Any suggestions?
>
> Mitch Fawcett
> Tapn'see Software
> Home of SuperList2
> http://www.tapnsee.software
>
>
>
>
>
> --
> For information on using the Palm Developer Forums, or to
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
>
>


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





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

Reply via email to