It is probably the problem of calling this function before the screen is drawn. Try
drawing the screen before setting the mode.
Jason D.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of David Tribble
Sent: Thursday, July 20, 2000 11:05 PM
To: Palm Developer Forum
Subject: WinScreenMode(winScreenModeSet ... crashes in debug ROM
G'Day,
I'm hoping someone has experience with this problem.
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL) is crashing for
me on the debug ROM but not on the non-debug ROM or device (no surprise).
Once I set the active form with FrmSetActiveForm, the application crashes
in the palmos35-dr4-en-ezdbg.rom ROM with POSE 3.0a6 (WinNT 4.0, CW 6.0) on
the next call to WinScreenMode. The majority of the message presented is
'has just performed an illegal operation. It performed a "bus error"'. If
I call WinScreenMode BEFORE the FrmSetActiveForm, it does NOT crash.
I set up the code like this to isolate the problem (it crashes for depth ==
1, 2, or 4):
UInt32 depth = 4;
...
formID = eventP->data.frmLoad.formID;
formP = FrmInitForm(formID);
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL); // does NOT
crash
FrmSetActiveForm(formP);
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL); // crashes
I've checked the form in Constructor and it is useable, non-modal, non-save
behind, 160x160 at 0,0, has no title or default button, and does have a
menu. This is the main form in my application...
The stack in CodeWarrior shows it is crashing 2 levels below my function
somewhere in WinScreenMode. Unfortunately I don't know assembly...
Has anyone seen anything similar? I don't recall seeing anything like this
on the list before, and I'm hoping someone will point out how silly I'm
being. Any help is appreciated.
thanks
trib
--------------------------------------------------
David Tribble, Logicon INRI Hawaii
(808) 625 2118 (v) (808) 625 6315 (f)
--
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/