Here is an error message from POSE:
"PalmEngine (1.0) has overflowed the stack. The functions currently using
the stack are: PalmEnginePalmMain(7058), PilotMain(16), <Unknown @
0x00052764>(106)."
Now, all I am doing is walking through my code from PilotMain() then
stepping into PalmEnginePalmMain().
Any ideas why this is happening? I am not calling any other functions
inbetween. It is just those two functions. I suspect that this might have
something to do with the segmenting issue; however, being that the two
functions are in the same file, I do not understand why it would have a
problem making a jump to the function in question.
I am definitely not an expert in the world of segmenting on the PalmOS. In
fact, this is my first project that has some sizeable numbers:
57K Code
234K Data
I gather that the code number is the one that has to be under 32K. Is there
a way to make that stretch? If not, what are some methods I can try with
separating my code into segments?
Although, another part of me says it isn't a segmenting issue since the
execution isn't even getting out of one file. I also removed the body of
PalmEnginePalmMain() and it ran fine. Well, it didn't do anything, but at
least it got through the functions. I have included the two functions below
my signature to be more clear.
Any help is always appreciated.
Regards,
Dan :->
UInt32 PalmEnginePalmMain( UInt16 cmd, MemPtr /*cmdPBP*/, UInt16
launchFlags )
{
tApp app;
//
// Check the version number first.
//
Err error = RomVersionCompatible ( kAppMinVersion, launchFlags );
if ( error )
{
Note( "RomVersionCompatible() failed in PalmEnginePalmMain()" );
return error;
}
//
// Run the app.
//
switch ( cmd )
{
case sysAppLaunchCmdNormalLaunch:
{
EventType event;
if ( !InitApp( &app ) )
{
Note( "InitApp() failed in PalmEnginePalmMain()" );
return kFalse;
}
do
{
EvtGetEvent( &event, 10 );
if ( !PreProcessEvent( &app, &event ) )
{
if ( !SysHandleEvent( &event ) )
{
RunApp( &app );
}
}
} while ( event.eType != appStopEvent );
if ( !TermApp( &app ) )
{
Note( "TermApp() failed in PalmEnginePalmMain()" );
return kFalse;
}
}
break;
default:
break;
}
return errNone;
}
UInt32 PilotMain( UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags )
{
return PalmEnginePalmMain( cmd, cmdPBP, launchFlags );
}
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/