Forum > Editor

[Partially Solved] My main form crashes Lazarus IDE

(1/4) > >>

lainz:
Hi, In the project I'm working I have a huge form (2 mb) that when it's opened it crashes the Lazarus IDE with 'access violation'.

If the form is closed Lazarus works normally.

How I can debug that? The ide in some time was at 900 MB of RAM usage, so it's leaking somewhere.

wp:
If you are working with Laz trunk: This version has been leaking for a few days recently. Try a more recent trunk version.

lainz:
Thanks I will try, I'm using trunk. It happens about a month ago or more, so I wish this can be solved or if I can debug it in some way.

Martin_fr:
There are several ways to debug the IDE.

First of all for any of them make sure you have debug info. In Tools > Configure build Lazarus
-gw -godwarfset -O- -gh
-Sa -gt -Criot

the 2nd line is optional.
Make sure this applies to any package you use. (installed in the IDE)


1) run the IDE with a logfile (on windows edit properties of a shortcut)
lazarus.exe --debug-log=/path/file.log

Crashes will likely write logs to the file

2) If you need very basic info only, or no trace was written in (1)
start gdb on commandline
  gdb lazarus.exe
and then use "r" to run it.
"bt" to get a trace when it stops

3) In the ide open the project ide/lazarus.lpi
Hit F9
A 2nd IDE will be started and is being debugged by the first.

------
Since you know aprox when it started, consider bisecting the guilty revision

lainz:
Ok what I get is this:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---TApplication.HandleException: EOutOfMemoryOut of memory  Stack trace:  $00413B9A  $00413EDA  $0061B2B2  ALLOCDATA,  line 329 of include/imglist.inc  $0061BF46  INTERNALINSERT,  line 626 of include/imglist.inc  $0061E112  ADDSLICE,  line 1390 of include/imglist.inc  $0062227A  ADDNEWBTNIMAGE,  line 2745 of include/imglist.inc  $00621F76  GETIMAGEINDEX,  line 2781 of include/imglist.inc  $007F96CD  GETIMAGEINDEX,  line 290 of ideimagesintf.pas  $008494C8  $008663DE  $00875CE8  $0043A61E  GETCHILDREN,  line 1072 of include/customform.inc  $008755B0  $00875E7A  $008760E7  $00875F59  $008785B8ERROR in code: Creating gdb catchable error:   $004E4BC4  DEBUGLNSTACK,  line 868 of lazloggerbase.pas  $004E20CC  DEBUGLNSTACK,  line 12 of LazLoggerImpl.inc  $004E61E7  RAISEGDBEXCEPTION,  line 48 of laztracer.pas  $00CDBECA  $00CDBE78  $008712E7  $0087407E  $005A339D  WNDPROC,  line 2186 of include/control.inc  $005A1D2A  PERFORM,  line 1580 of include/control.inc  $00595CF4  PAINTCONTROLS,  line 4959 of include/wincontrol.inc  $00595AE0  PAINTHANDLER,  line 4871 of include/wincontrol.inc  $00599D2B  WMPAINT,  line 6841 of include/wincontrol.inc  $005ACD4D  WMPAINT,  line 98 of include/customcontrol.inc  $00410449  $0087407E  $005A339D  WNDPROC,  line 2186 of include/control.inc  $00596E2B  WNDPROC,  line 5425 of include/wincontrol.inc  $0068472A  DELIVERMESSAGE,  line 112 of lclmessageglue.pas  $00572FDE  SENDPAINTMESSAGE,  line 710 of win32/win32callback.inc  $0057749D  DOWINDOWPROC,  line 2297 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AABECA  $76AABC57  $723A5F23  $73489FBF  $734C0F7E  $734C0E64  $7346FA96  $76ACBF1B  $76AC83EA  $76AA7AFD  $00571DD9  CALLDEFAULTWINDOWPROC,  line 97 of win32/win32callback.inc  $005779E6  DOWINDOWPROC,  line 2445 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AC7F8A  $76ACA6D9  $7748CD3D  $6B677DE6  $76ABA989  $7748CD3D  $76AC90A4  $76AA8FB3  $76AA4B0A  $76AA4A22  $76AA49DB  $7357D5A3  $734A6A35  $734A7526  $00583A3B  PROMPTUSER,  line 773 of win32/win32lclintf.inc  $0052F1AD  PROMPTUSER,  line 376 of include/lclintf.inc  $0052F7EF  PROMPTUSER,  line 535 of include/lclintf.inc  $00446DD0  SHOWEXCEPTION,  line 1591 of include/application.inc  $0078A169  HANDLEAPPLICATIONEXCEPTION,  line 28 of lclexceptionstacktrace.pas  $00445EC0  HANDLEEXCEPTION,  line 1258 of include/application.inc  $004465EB  RUNLOOP,  line 1421 of include/application.inc  $0048F2EF  APPRUN,  line 54 of include/interfacebase.inc  $00446556  RUN,  line 1407 of include/application.inc  $00403A9B  main,  line 152 of lazarus.pp  $00418C76ERROR in code: Creating gdb catchable error:   $004E4BC4  DEBUGLNSTACK,  line 868 of lazloggerbase.pas  $004E20CC  DEBUGLNSTACK,  line 12 of LazLoggerImpl.inc  $004E61E7  RAISEGDBEXCEPTION,  line 48 of laztracer.pas  $00CDBECA  $00CDBE78  $008712E7  $0087407E  $005A339D  WNDPROC,  line 2186 of include/control.inc  $00596E2B  WNDPROC,  line 5425 of include/wincontrol.inc  $0068472A  DELIVERMESSAGE,  line 112 of lclmessageglue.pas  $00572FDE  SENDPAINTMESSAGE,  line 710 of win32/win32callback.inc  $0057749D  DOWINDOWPROC,  line 2297 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AABECA  $76AABC57  $723A5F23  $73489FBF  $734C0F7E  $734C0E64  $7346FA96  $76ACBF1B  $76AC83EA  $76AA7AFD  $00571DD9  CALLDEFAULTWINDOWPROC,  line 97 of win32/win32callback.inc  $005779E6  DOWINDOWPROC,  line 2445 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AC7F8A  $76ACA6D9  $7748CD3D  $0044542E  UPDATEVISIBLE,  line 992 of include/application.inc  $004391F6  SETVISIBLE,  line 493 of include/customform.inc  $0043DFA0  HIDE,  line 2318 of include/customform.inc  $00438502  BEFOREDESTRUCTION,  line 183 of include/customform.inc  $00438560  DESTROY,  line 198 of include/customform.inc  $0040FF42  $00433E3D  BEFOREFINALIZATION,  line 1935 of forms.pp  $00412C01  $006847A3  DELIVERMESSAGE,  line 116 of lclmessageglue.pas  $00572FDE  SENDPAINTMESSAGE,  line 710 of win32/win32callback.inc  $0057749D  DOWINDOWPROC,  line 2297 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AABECA  $76AABC57  $723A5F23  $73489FBF  $734C0F7E  $734C0E64  $7346FA96  $76ACBF1B  $76AC83EA  $76AA7AFD  $00571DD9  CALLDEFAULTWINDOWPROC,  line 97 of win32/win32callback.inc  $005779E6  DOWINDOWPROC,  line 2445 of win32/win32callback.inc  $00578589  WINDOWPROC,  line 2699 of win32/win32callback.inc  $76ACBF1B  $76AC83EA  $76AC7F8A  $76ACA6D9  $7748CD3D  $6B677DE6  $76ABA989  $7748CD3D  $76AC90A4  $76AA8FB3  $76AA4B0A  $76AA4A22  $76AA49DB  $7357D5A3  $734A6A35  $734A7526  $00583A3B  PROMPTUSER,  line 773 of win32/win32lclintf.inc  $0052F1AD  PROMPTUSER,  line 376 of include/lclintf.inc  $0052F7EF  PROMPTUSER,  line 535 of include/lclintf.inc  $00446DD0  SHOWEXCEPTION,  line 1591 of include/application.inc  $0078A169  HANDLEAPPLICATIONEXCEPTION,  line 28 of lclexceptionstacktrace.pas  $00445EC0  HANDLEEXCEPTION,  line 1258 of include/application.inc  $0044
As well as the attached image.

Navigation

[0] Message Index

[#] Next page

Go to full version