Hi!

Recently I ported a small application of mine that uses C++ 
exceptions extensively, to PalmOS, using Codewarrior 9 (.3, I 
think). Actually the app does run fine in the device, whether 
exceptions are thrown or not. It also runs on the Emulator, but 
most of the time it jumps with the following warning:

   MyApp (1.0) is close to overflowing the stack. The functions
   currently using the stack are: cjsmwait(60), cjrmrsv(20),
   MemSemaphoreReserve(24), MemChunkFree(22), <Unknown @
   0x10D5B18C> (44) ....


If I choose to "Continue" execution, the program does continue
normally, without crashing or anything. If I "Debug", the call
stack refers me to a point in my application where an exception 
was caught and rethrown again (or so it seems, since the stack 
contains a "__rethrow" function being called). The call stack 
contains 21 functions, with only 1 being at my code:

0x10D0EBC6 (HALSysAppLaunch)
0x10C0DDE2 (SysAppLaunch)
0x10C0E7DC (PrvCallSafely)
0x10D19532 (__Startup__)
0x10D19ADA (PilotMain)
0x10D19608 (UIAppShellMain)
0x10D19992 (PrvAppLaunchLoop)
0x10D0EBC6 (HALSysAppLaunch)
0x10C0DDCA (SysAppLaunch)
0x10C0E80A (PrvCallWithNewStack)
__Startup__
PilotMain <----------------------------- This one is at my code
__rethrow
Ex68K_ThrowHandler(ThrowContext*)
Ex68K_UnwindStack(ThrowContext*,MWExceptionInfo*,void*)
0x10D5B18C (68K)
0x10C10662 (MemChunkFree)
0x10C861BE (MemSemaphoreReserve)
0x10C89894 (cjrmrsv)
0x10C89894 (cjrmrsv)
0x10C89A5A (cjsmwait)

Also, it does issue this warning more than once (typically 4 or 5 times), but 
with a somewhat different stack trace at the bottom of
the above list. 

Am I really overflowing the stack in my program by using 
exceptions? Or is it only exceptions that are thrown again? 
Any directions on where to look from this on will be greatly appreciated!

(Note: The Simulator does not issue such a warning. Would that be
 because exceptions were not planned to be compiled in 68k, or 
 something similar? Anybody? )

- Izhido

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

Reply via email to