[fpc-pascal] Strange WinCE Bug

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Mar 11 11:13:34 CET 2010


Who maintains the wince port and the arm port?

Some users are experiencing a very wierd bug in wince-arm which
happens in pure lcl app or kol app + lnet (no idea what the common
factor is). It also happens in some devices, but not all of them and
acording to the reports it doesn't happen if you use FPC 2.2.0

Basically the app crashes if you turn the wireless on/off. It seams to
me that the next instruction pointer gets corrupted in this call:

procedure TWinCEWidgetSet.AppProcessMessages;
  AMessage: TMsg;
  AccelTable: HACCEL;
  retVal, index: dword;
  pHandles: Windows.LPHANDLE;
    retVal := Windows.MsgWaitForMultipleObjects(0,
      nil, False, 0, QS_ALLINPUT);

And goes somewhere random, even trying to call a variable in fpimage
in some devices =D

What puzzles me is that this call is virtually impossible to have
something wrong, so I guess it can only be either a compiler bug or a
bug in Windows CE.

Normally I would create a bug report, but the bug is such that only
some devices reproduce it and it's so obscure, so I'm afraid it's
impossible to create a simple example that reproduces it. Here is the
original thread:


What do you recommend? Simply creating a report?

Felipe Monteiro de Carvalho

More information about the fpc-pascal mailing list