[Lazarus] Weird AccessViolation (etc) while closing window in WinCE

Tommi Prami groups.tprami at gmail.com
Fri Aug 12 12:12:52 CEST 2011


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 TWINDOW_MM_SELECTUSER__EXCECUTE at wmm_selectuser.pas: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 main at seulopda.lpr:40





More information about the Lazarus mailing list