Forum > PDAs and Smartphones

Lazarus+FPC application bad crash on WinCE

(1/18) > >>

Al Berto:
Hi all,
my name is Alberto, I'm a programmer from Italy.

I've developed a telephone client application for WinCE using Lazarus(0.9.28.2)+FPC(2.2.4-2.4.0)+KOL/MCK(2.80.3-2.88)
Everything is working good with the beautiful KOL components but... sometimes application crash with SIGILL (using gdb).
No problem with WinCE emulator (Windows Mobile 6 PRO version 5.2.1235, Windows Mobile 6.1 PRO version 5.2.20757)

So I create a smaller program to reproduce it (KOLtest).

I'm testing it on a ASUS P552w Windows Mobile 6.1 PRO version 5.2.19965.
The small KOLtest is a form with a button and an edit box.
Run it thru gdb or directly, it's the same.
1- Click on the KOLtest button
2- click on the network icon, toggle WIFI, exit
3- goto 1
after toggling WIFI on/off  for four-five times, the application crash with no errors, after a little O.S. hanging it just disappear, on gdb I have SIGILL or SIGSEGV at different point.

I tried with FPC 2.2.4 or 2.4.0, KOL/MCK 2.80.3 or SVN trunk 2.88.
Could it be a bug on FPC compiler or KOL/MCK?
I don't know how to fix it...

Any help would be really appreciated, I'm getting (quite) mad about it!
Many thanks
bye

Alberto

Al Berto:
Hi all

I did a simple WinCE application, just an empty form, no KOL-CE.

If I launch on my PDA (Asus P552w), then go to Network icon and toggle WIFI, my application crashes with SIGILL.

On compiler options, Widget is Wince, OS is Wince, processor is Arm.
Lazarus 0.9.28.2beta, FPC 2.2.4

I think I misconfigured the compiler or something else, don't know what, it's just a simple new project...

Any ideas?

bye
Alberto

Al Berto:
Hi all,

this bad crash on a simple empty form application is not acceptable for me...
As I had no replies at all I'm sure I'm the only one to have these issues, so I would like to discover what am I doing wrong (compiler misconfiguration, device operating system problem...)

Any help would be appreciated.

bye
Alberto

felipemdc:
Hello, Sorry, I was very busy with the Lazarus book ...

Could you create a backtrace with GDB and post it here so that I can see what the problem is? If you don't know how to do this, there are instructions here:

http://wiki.lazarus.freepascal.org/Creating_a_Backtrace_with_GDB

Can you reproduce the crash in an emulator? I tryed in my emulator, but it doesn't crash.

thanks,

Al Berto:
Hi Felipe, thanks for your reply
I recompiled the test program with GDB informations (-g and -gl) and it's about 11 MB, using lazarus 0.9.28.2 beta and FPC 2.2.4.
Testing on Asus P552w Windows Mobile 6.1 PRO (CE 5.2.19965 build 19965.1.2.3)

Loaded DLL...

7ff91000:commctrl.dll.0410.mui
3354000:commctrl.dll
38ae000:aygshell.dll
3138000:ossvcs.dll
7ffe1000:coredll.dll.0410.mui
317c000:oleaut32.dll
31ab000:ole32.dll
3f4d000:coredll.dll
2788000:packageinfoapi.dll
3815000:compime.dll
7ff81000:shellres.dll

Then I click on the WiFi icon, popup showed, click on "Wireless Manager", connection manager form is shown, toggle WiFi, press Exit from this form (sometime just once other times a couple of toggling) after some seconds I got:

Program received signal SIGSEGV, Segmentation fault.
0x001bb284 in U_CLASSES_MAINTHREADID ()
(gdb) bt full
#0  0x001bb284 in U_CLASSES_MAINTHREADID ()
No symbol table info available.
#1  0x00024338 in WINDOWS_MSGWAITFORMULTIPLEOBJECTS$LONGWORD$LPHANDLE$LONGBOOL$LONGWORD$LONGWORD$$LO
NGWORD ()
No symbol table info available.
#2  0x001299bc in TWINCEWIDGETSET__APPPROCESSMESSAGES (this=0x1a148f0) at winceobject.inc:296
        AMESSAGE = {HWND = 2080936096, MESSAGE = 15, WPARAM = 0, LPARAM = 0, TIME = 4254576,
  PT = {X = 16777394, Y = 27333760}}
        ACCELTABLE = 215244
        RETVAL = 203576
        INDEX = 594607056
        PHANDLES = (LPHANDLE) 0x0
#3  0x00033e98 in TAPPLICATION__HANDLEMESSAGE (this=0x1a11480) at application.inc:1135
No locals.
#4  0x000343a0 in TAPPLICATION__RUNLOOP (this=0x1a11480) at application.inc:1269
No locals.
#5  0x0003b378 in TWIDGETSET__APPRUN (ALOOP=0x34350 <TAPPLICATION__RUNLOOP>, this=0x1a148f0)
    at interfacebase.inc:49
No locals.
#6  0x00034344 in TAPPLICATION__RUN (this=0x1a11480) at application.inc:1257
No locals.
#7  0x00011c70 in main () at testpro1.lpr:18
No locals.
-----------------------------------------------

Second run I got:

Program received signal SIGSEGV, Segmentation fault.
0x001bb348 in U_SYSUTILS_OUTOFMEMORY ()
(gdb) bt full
#0  0x001bb348 in U_SYSUTILS_OUTOFMEMORY ()
No symbol table info available.
#1  0x00000000 in ?? ()
No symbol table info available.
-----------------------------------------------

Third run:

Program received signal ?, Unknown signal.
0x001bb284 in U_CLASSES_MAINTHREADID ()
(gdb) bt full
#0  0x001bb284 in U_CLASSES_MAINTHREADID ()
No symbol table info available.
#1  0x00024338 in WINDOWS_MSGWAITFORMULTIPLEOBJECTS$LONGWORD$LPHANDLE$LONGBOOL$LONGWORD$LONGWORD$$LO
NGWORD ()
No symbol table info available.
#2  0x001299bc in TWINCEWIDGETSET__APPPROCESSMESSAGES (this=0x1a148f0) at winceobject.inc:296
        AMESSAGE = {HWND = 2080975456, MESSAGE = 96, WPARAM = 2080975456, LPARAM = 224,
  TIME = 4937893, PT = {X = 16777245, Y = 27333760}}
        ACCELTABLE = 215244
        RETVAL = 203576
        INDEX = 594607056
        PHANDLES = (LPHANDLE) 0x0
#3  0x00033e98 in TAPPLICATION__HANDLEMESSAGE (this=0x1a11480) at application.inc:1135
No locals.
#4  0x000343a0 in TAPPLICATION__RUNLOOP (this=0x1a11480) at application.inc:1269
No locals.
#5  0x0003b378 in TWIDGETSET__APPRUN (ALOOP=0x34350 <TAPPLICATION__RUNLOOP>, this=0x1a148f0)
    at interfacebase.inc:49
No locals.
#6  0x00034344 in TAPPLICATION__RUN (this=0x1a11480) at application.inc:1257
No locals.
#7  0x00011c70 in main () at testpro1.lpr:18
No locals.
-----------------------------------------------

Fourth run:

Program received signal SIGSEGV, Segmentation fault.
0x001bb288 in U_CLASSES_SYNCHRONIZETIMEOUTEVENT ()
(gdb) bt full
#0  0x001bb288 in U_CLASSES_SYNCHRONIZETIMEOUTEVENT ()
No symbol table info available.
#1  0x00024338 in WINDOWS_MSGWAITFORMULTIPLEOBJECTS$LONGWORD$LPHANDLE$LONGBOOL$LONGWORD$LONGWORD$$LO
NGWORD ()
No symbol table info available.
#2  0x001299bc in TWINCEWIDGETSET__APPPROCESSMESSAGES (this=0x1a148f0) at winceobject.inc:296
        AMESSAGE = {HWND = 0, MESSAGE = 96, WPARAM = 0, LPARAM = 0, TIME = 5063558, PT = {X = 1,
    Y = 212664}}
        ACCELTABLE = 215244
        RETVAL = 203576
        INDEX = 594607056
        PHANDLES = (LPHANDLE) 0x0
#3  0x00033e98 in TAPPLICATION__HANDLEMESSAGE (this=0x1a11480) at application.inc:1135
No locals.
#4  0x000343a0 in TAPPLICATION__RUNLOOP (this=0x1a11480) at application.inc:1269
No locals.
#5  0x0003b378 in TWIDGETSET__APPRUN (ALOOP=0x34350 <TAPPLICATION__RUNLOOP>, this=0x1a148f0)
    at interfacebase.inc:49
No locals.
#6  0x00034344 in TAPPLICATION__RUN (this=0x1a11480) at application.inc:1257
No locals.
#7  0x00011c70 in main () at testpro1.lpr:18
No locals.
-----------------------------------------------

Fifth run:

Program received signal SIGSEGV, Segmentation fault.
0x001bb284 in U_CLASSES_MAINTHREADID ()
(gdb) bt full
#0  0x001bb284 in U_CLASSES_MAINTHREADID ()
No symbol table info available.
#1  0x00024338 in WINDOWS_MSGWAITFORMULTIPLEOBJECTS$LONGWORD$LPHANDLE$LONGBOOL$LONGWORD$LONGWORD$$LO
NGWORD ()
No symbol table info available.
#2  0x001299bc in TWINCEWIDGETSET__APPPROCESSMESSAGES (this=0x1a148f0) at winceobject.inc:296
        AMESSAGE = {HWND = 2080975728, MESSAGE = 96, WPARAM = 2080975728, LPARAM = 224,
  TIME = 5210549, PT = {X = 16777288, Y = 27333760}}
        ACCELTABLE = 215244
        RETVAL = 203576
        INDEX = 594607056
        PHANDLES = (LPHANDLE) 0x0
#3  0x00033e98 in TAPPLICATION__HANDLEMESSAGE (this=0x1a11480) at application.inc:1135
No locals.
#4  0x000343a0 in TAPPLICATION__RUNLOOP (this=0x1a11480) at application.inc:1269
No locals.
#5  0x0003b378 in TWIDGETSET__APPRUN (ALOOP=0x34350 <TAPPLICATION__RUNLOOP>, this=0x1a148f0)
    at interfacebase.inc:49
No locals.
#6  0x00034344 in TAPPLICATION__RUN (this=0x1a11480) at application.inc:1257
No locals.
#7  0x00011c70 in main () at testpro1.lpr:18
No locals.
-----------------------------------------------

It looks like each time there are different errors...

After each run the application is still alive on PDA (but not working) until I close GDB, I can't kill it from task manager. Application memory use is about 328KB.

On emulator I can't get it to crash as no "Wireless Manager" form is displayed when I click on the popup message, so I can't reproduce the same operation.

I'm happy to do any other testings, thank you.

bye
Alberto

Navigation

[0] Message Index

[#] Next page

Go to full version