crashes before any code could be stack-related

1. do you have any functions that call a LOT of APIs? (CW has a bug
where if a function calls way too many apis the stack overflows [i saw
this documented somewhere and have seen this happen but i cannot right
now find where i saw this documented])
2. do you have any functions where you have a lot of stack usage?
3. have you tried editing the "pref" 0 resource to make more stack space?
4. if you disassemble the app, and look at the beginning of the code
(not the startup code but PilotMain), there should be something like
"lea     -$XXX(sp),sp" or "link a6,-$XXX" see if those values
represented by XXX are overly large

On 1/17/07, Bruce Waters <[EMAIL PROTECTED]> wrote:


Hello all,
I've had a bizarre problem for a week. Our app runs perfectly well in POSE.
We just finished adding expansion card support using VFS manager, so we
could run it on a real AlphaSmart Dana. My first attempt was fine - it ran
thoughI didn't utilize all its functionality, but just exited shortly after
starting as I wanted to test restarting. I restarted a couple of times, all
worked as expected. I went back to my CodeWarrior 9.3 IDE and build some
trivial code, and added a few VFSFileClose() calls that we had forgotten to
include. Then downloaded the new AdaptItDana.prc file (Release compilation)
over the older installation using the Palm Desktop software's Install
function, on my XP Pro SP2 Windows laptop.

Here's where things went wrong. At the "cleaning up" point of the hotsynch,
a Fatal Alert came up: the message in it said "Fatal Exception", and there
was only a Reset button provided. I pressed the Reset button, the alert went
away for a few seconds, and then it returned. Nothing I could do would
permanently dismiss the Alert, so I had to hard reset the Dana - wiping out
the downloaded AdaptItDana app.

I then tried putting the app on the SD expansion card in the /Palm/Launcher/
folder, to speed up the process. Inserting the card in the Dana I was shown
the app icon in the Launcher window as expected, but as soon as I tapped it,
the same Fatal Alert came up, and was only dismissable by a hard reset.

This has been the pattern for the last week. Everything I have tried has not
succeeded. In POSE, everything is fine though. I've completely rebuilt the
project in the CodeWarrior IDE, but it made no difference. I've tried
debugging using the Dana as the debugger target, but the Fatal Alert comes
up immediately the downloaded app commences to run, and before any of the
Threads windows get anything put in them. To try figure out how far into the
app it runs before failing, I put a simple alert at the very start of
PilotMain(), but running on the Dana the Fatal Alert comes up before my
alert gets a chance to run. Removing code changes (but leaving the needed
VFSFileClose() calls) added since the first successful run did not restore
it to run successfully (same Fatal Alert still happens). I've no
optimizations on when compiling the Release version. If I make another C++
app using the template, and put a few trivial things in it, it runs fine
under POSE and on the Dana; but when I add my app's source code to such a
new starter app, and despite a perfect compile and perfect operation in
POSE, as soon as I try running it on a Dana, the Fatal Alert manifests. I've
used only standard settings in the IDE, with a few minor tweaks, and the
Code Entry Point is the standard  __Startup__  which I've never changed.
Attempts to debug the problem run foul of the fact that the exception
manifests before PilotMain() starts running - so I'm locked out of any way
to get at what might be happening.

Can anyone shed any light on this? I'm perfectly willing for anyone ready to
have a play to receive the whole project on trust and have a go at sorting
it out. Just to get the little alert I put at the start of PilotMain to show
would mean the problem is solved; so no knowledge of what the app does would
be required. I sure hope someone can help: 3 years work is at a standstill
until we can get past this problem. (I'm not a formally trained IT person,
but a bright self taught programmer who has been programming for 30 years,
comfortable in C and C++. So please don't make too many assumptions about
what I may know.)

Many thanks,  --Bruce Waters
Sorry about the long post, but more info might make replies more informative
and eliminate unhelpful guesses.
 --
 For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/


--
Best Regards, Dmitry Grinberg
Software Engineer, http://PalmPowerups.com
(847) 226 9295
AIM: DmitryGrinberg
MSN: [EMAIL PROTECTED]
ICQ: 165589894
Y! IM: dmitrygr2003

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

Reply via email to