Using some of the ideas in previous threads in this forum, I am launching my 
application from within itself via SysAppLaunch, using the 
sysAppLaunchFlagNewGlobals flag.  I do this while processing a 
sysAppLaunchCmdNotify launch code.  The reason I'm doing it is to gain access 
to more than the first segment of my code.

On the Simulator, POSE, my Tungsten T, and my TX, the basic idea is working.  I 
am able to call functions in all segments after the SysAppLaunch call, and 
they're working properly.  Unfortunately, when I try to invoke a simple alert 
via FrmCustomAlert, the Simulator crashes on me with a MemorMgr.c NULL Handle 
error.

I've tried including sysAppLaunchFlagUIApp in the SysAppLaunch flags, with no 
improvement.  It's even more perplexing, because when I do this:

    DmOpenRef dRef = DmOpenDatabaseByTypeCreator( sysFileTApplication, 
myAppCreator, dmModeReadOnly );
    Err err = DmGetLastErr();
    if( dRef != 0  &&  err == errNone )
    {
        uint16 index = DmFindResource( dRef, 'Talt', MessageAlert, NULL );
        err = DmGetLastErr();
        if( index != 0xFFFF  &&  err == errNone )
            FrmCustomAlert( MessageAlert, "whatever", "", "" );
    }

execution runs successfully upt to the FrmCustomAlert call--that is, the 
database is open and the resource is there, but still FrmCustomAlert crashes.

I know that doing this SysAppLaunch thing with sysAppLaunchFlagNewGlobals is 
frowned upon, but I've given up trying to cram all my critical code into 
Segment 1.

Any ideas why this is happening, and/or suggestions on how to fix it?

Thanks,

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

Reply via email to