I have a strange problem with the debug version of the 3.5 ROM and am trying
to determine where it comes from.

The problem: WinScreenMode() crashes in WinRGBToIndex() when called with
winScreenModeSet (even with the default settings). After some exploration,
it appeared that WinRGBToIndex() is accessing a pointer to a bitmap stored
at low memory address 0x194. This pointer, in my case, is 0x80000000 which
is obviously incorrect.

After more research, it appeared that the value at 0x194 is modified during
an FrmInitForm() call in my ApplicationHandleEvent handler.  Here is some
code:

static Boolean ApplicationHandleEvent(EventPtr event)
{
    FormPtr    frm;
    Int16    formId;
    Boolean    handled = false;

    if (event->eType == frmLoadEvent) {
            // Load the form resource specified in the event
            // then activate the form.
        formId = event->data.frmLoad.formID;
        frm = FrmInitForm(formId);
        FrmSetActiveForm(frm);
...

The value in low memory gets overwritten with 0x80000000 during the
FrmInitForm() system call.

Now if I try with the non-debug version of the 3.5 ROM, there is no problem:
the value at 0x194 is _not_ reset!

Can anybody shed some light on this stange behaviour ? What may be wrong in
my app for this to happen?

Thanks,
Florent.


-- 
Florent Pillet, Software Architect
OPTeWAY S.A., 80 route des Lucioles, ACTE Immeuble Delta
06901 Sophia Antipolis cedex, FRANCE
Ph: +33 4 93 95 66 51, Fx: +33 4 93 95 66 52, http://www.opteway.com/


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to