Hello,

recently we encountered strange crashes of our app. All of them appeared
only when Tealscript was enabled. (TS is a kind of hack offering improved
character recognition. It does so by replacing some system traps.)

Very strange thing is that the crashes can be more-or-less safely reproduced
after TS is activated. Once we pass certain crash, it cannot be reproduced
(unless TS is switched off/on), but the other crashes (usually) work (until
they happen the first time). This points to an initialization problem in the
Tealscript.

Here is a typical sequence:

TS activated.
Our app launched, a dialog with an edit box opened.
Writing 1 letter on the graffiti -> crash.

During the text editing we run our own event loop, where we process some
special events. (Such as eg. scrolling when keyDownEvent for vchrPageDown
appears.)

Another typical crash happens when the Find button is pressed while the
progress dialog is running. The logic of the progress dialog is as follows:
During lenghty processing we periodically call HandleEvents(10), which runs
the event queue with a single purpose: to test whether the user issued an
abort signal. Just for the illustration here is the relevant code:

static Boolean g_bHas5way = false ;

Boolean TestAppStopEvent( EventType *event )
{
  if( g_bHas5way  &&  event->eType == keyDownEvent  &&
vtKeydownIsVirtual( event) )
    if( event->data.keyDown.keyCode & navBitSelect )
      if( event->data.keyDown.modifiers & autoRepeatKeyMask )
      {
        EventType ev ;
        ev.eType = appStopEvent ;
        EvtAddEventToQueue( &ev );
        return true ;
      }
  return false ;
}

static void HandleEvents( int count )
{
 EventType event;

 while( count-- && EvtEventAvail() )
 {
  EvtGetEvent(&event, 1);
  if( event.eType != nilEvent )
  {
   if( TestAppStopEvent( &event) )
   {
    g_abort = true;
    break ;
   }
   if(! SysHandleEvent(&event) && g_progressActive )
     FrmDispatchEvent(&event);
   if( event.eType == appStopEvent )
   {
    EvtAddEventToQueue( &event );
    g_abort = true;
    break;
   }
  }
 }
}


One user reports a crash after our app exits. (Again, only when TS is
active.)

The last thing: After I did some (seemingly unrelated) changes and after a
hard reset (forced by some calculator), my crashes disappeared, whereas the
user experiences his crashes further on.

I have no idea what to do and the Tealscript guys are not interested either.
(Although I would bet that the problem is on their side.)

Can anybody give me some advice?

Jan Slodicka


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

Reply via email to