Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

Weird AccessViolation (etc) while closing window in WinCE

5 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Tommi Prami

Win32 version of this exaact same code works

Only difference between device and the debugged version on the Emulator is that on Device it shows Access Violation error (usually) and then it just dies. On emulator I get tons of error messages, and then the program dies...

( I show this for between try.except and do not re raise, so IMHO it shoudl still get up again, unless there is something really bad happening behind the Scenes...)

{ Backwards is the Stack trace is also... }

Access Violation at :

procedure TMenuItem.DestroyHandle;
...
   end;
   TWSMenuItemClass(WidgetSetClass).DestroyHandle(Self); // <- Here
   FHandle := 0;

project Selo pda raised exception 'RunError(216)'

Project Selo pda raised exception class 'External: SIGSEGV'

#0 fpc_raiseexception at :0
#1 SYSUTILS_RUNERRORTOEXCEPT$LONGINT$POINTER$POINTER at :0 #2 SYSTEM_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER at :0 #3 TMENUITEM__DESTROYHANDLE at C:\lazarus\lcl\include\menuitem.inc:698 #4 TMENUITEM__DESTROYHANDLE at C:\lazarus\lcl\include\menuitem.inc:694 #5 TMENU__DESTROYHANDLE at C:\lazarus\lcl\include\menu.inc:157 #6 TCUSTOMFORM__DESTROYWND at C:\lazarus\lcl\include\customform.inc:2488 #7 TWINCONTROL__DESTROYHANDLE((TWINCONTROL) 0x1abcec0) at C:\lazarus\lcl\include\wincontrol.inc:5145
#8 TCUSTOMFORM__SHOWMODAL((TCUSTOMFORM) 0x1abcec0) at C:\lazarus\lcl\include\customform.inc:2705
#9 :247
#10 TWINDOW_MAINMENU__DOLOGIN((TWINDOW_MAINMENU) 0x1aa79a0) at wmainmenu.pas:220
#11 TWINDOW_MAINMENU__FORMSHOW((^TOBJECT) 0x1cf3b4) at wmainmenu.pas:376 #12 TCUSTOMFORM__DOSHOW at C:\lazarus\lcl\include\customform.inc:957 #13 TCUSTOMFORM__CMSHOWINGCHANGED({MSG = 45081, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, (TCUSTOMFORM) 0x1aa79a0) at C:\lazarus\lcl\include\customform.inc:562
#14 SYSTEM_TOBJECT_$__DISPATCH$formal at :0
#15 TCONTROL__WNDPROC({MSG = 45081, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}, (TCONTROL) 0x1aa79a0) at
C:\lazarus\lcl\include\control.inc:1683
#16 TWINCONTROL__WNDPROC({MSG = 45081, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}) at C:\lazarus\lcl\include\wincontrol.inc:5243 #17 TCUSTOMFORM__WNDPROC({MSG = 45081, WPARAM = 0, LPARAM = 0, RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, LPARAMLO = 0, LPARAMHI = 0, RESULTLO = 0, RESULTHI = 0}) at C:\lazarus\lcl\include\customform.inc:1368 #18 TCONTROL__PERFORM(45081, 0, 0) at
C:\lazarus\lcl\include\control.inc:1084
#19 CHANGESHOWING(true, (POINTER) 0x27a8fa58) at
C:\lazarus\lcl\include\wincontrol.inc:4237
#20 TWINCONTROL__UPDATESHOWING((TWINCONTROL) 0x1aa79a0) at C:\lazarus\lcl\include\wincontrol.inc:4287
#21 TCUSTOMFORM__UPDATESHOWING at C:\lazarus\lcl\include\customform.inc:2569 #22 TWINCONTROL__DOALLAUTOSIZE((TWINCONTROL) 0x1aa79a0) at C:\lazarus\lcl\include\wincontrol.inc:3519
#23 TCONTROL__ENABLEAUTOSIZING at C:\lazarus\lcl\include\control.inc:4855 #24 TCONTROL__SETVISIBLE(true, (TCONTROL) 0x1aa79a0) at C:\lazarus\lcl\include\control.inc:3733
#25 TCUSTOMFORM__SETVISIBLE(true) at
C:\lazarus\lcl\include\customform.inc:404
#26 TCUSTOMFORM__SHOW at C:\lazarus\lcl\include\customform.inc:2115 #27 TAPPLICATION__RUN at C:\lazarus\lcl\include\application.inc:1384 #28 :40

Reply by email

Felipe Monteiro de Carvalho
to Tommi Prami

1> Which FPC, Lazarus and Windows CE versions?

2> Have you tryed with the latest lazarus? If yes, have you tryed with 0.9.30? And 0.9.28?

3> Does a minimal application reproduce the issue?

4> Bug reports should go to the bug tracker

Felipe Monteiro de Carvalho

Reply by email

Tommi Prami
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote
1> Which FPC, Lazarus and Windows CE versions?

FPC 2.4.4
Lazarus latest Trunk (From today)
WinCE... hmmm, actually it is Windows Mobile 6.5 Pro (I think in both the Emulator and the Device)

2> Have you tryed with the latest lazarus? If yes, have you tryed with 0.9.30? And 0.9.28?

Latest yes, older no, I have no idea how to make them Co Exist in same machine...

3> Does a minimal application reproduce the issue?

I am going to try this next...

4> Bug reports should go to the bug tracker

This is just Heads up, or query is this an valid problem to report as bug (Might be know issue for someone and fix is being made etc...)

Like now I forgot important information and did not test with trivial program...

-TP-

Reply by email

Tommi Prami
to Felipe Monteiro de Carvalho: 1> Which FPC, Lazarus and Windows CE versions? 2> Have you tryed with the latest lazarus?…
Felipe Monteiro de Carvalho wrote 9 lines
1> Which FPC, Lazarus and Windows CE versions? 2> Have you tryed with the latest lazarus? If yes, have you tryed with 0.9.30? And 0.9.28? 3> Does a minimal application reproduce the issue? 4> Bug reports should go to the bug tracker

Bug report : http://bugs.freepascal.org/view.php?id=19972

-Tee-

Reply by email