Forum > General
How to analyze / debug compiler crashes?
SirTwist:
Good morning fellow developers,
I am using FP/Laz for roughly 10 years and mostly writing programs for my very own usage or f or our dance sport comunity.
Whenever my projects are growing larger (15.000 lines of code, approx. 20 forms and frames), I encounter "randomly" compiler crashes. In many cases they only ocure when I do a normal compile (Ctrl-F9), and a "build" (Shift-F9) will then run through.
But now I reached again the state where even "Build" will crash. After the crash, the IDE points either to the last line of a random unit (with a column 50,000 or above), or at some 'interface' definition of an generic object definition.
I am heavily using generics. And packages, both written by myself or third-party-packages.
I theoretically know how to raise a bug report, but I would need to upload the whole source code and all the packages etc. into public.
Does anyone have some tips how to debug such a compiler crash by myself?
I am using Lazarus 3.4 with FPC 3.2.2 on Windows 10, installed by pfcupdeluxe. I also tried to update the compiler, but than some of the third-party packages would not compile.
Any help appreciated,
Kind regards,
Sir Twist
--- 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";}};} ---UlcDmxUniverses.pas(359,57867) Error: Compilation raised exception internallyVerbose: Compilation abortedDebug: An unhandled exception occurred at $000000010003C5A4:Debug: EAccessViolation: Access violationDebug: $000000010003C5A4Debug: $000000010019C48CDebug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D7CEDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805
Fibonacci:
--- Quote from: SirTwist on June 21, 2026, 10:24:27 am ---installed by pfcupdeluxe. I also tried to update the compiler, but than some of the third-party packages would not compile.
(...)
--- 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";}};} ---UlcDmxUniverses.pas(359,57867) Error: Compilation raised exception internallyVerbose: Compilation abortedDebug: An unhandled exception occurred at $000000010003C5A4:Debug: EAccessViolation: Access violationDebug: $000000010003C5A4Debug: $000000010019C48CDebug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D7CEDebug: $000000010003DCE5Debug: $00000001000D4805Debug: $000000010019C469Debug: $000000010019D46EDebug: $000000010003DCE5Debug: $00000001000D4805
--- End quote ---
Setup+ -> Options override -> FPC Options -> tick "[ ] Debug" -> Rebuild, and wait for another crash.
jamie:
Did i read that correctly? 57000+ chars on a single line?
jamie:
I wanted to add that i stopped using the generics collection unit because it crashes the compiler, ends with a error pointing at the main project file looking for a asm lable . I guess it chews up memory fast.
I questioned the use of a ref being made to a zero sized record on the heap.
Jamie
Thaddy:
@Jamie
He mentioned the bogus line size in the question:
--- Quote ---After the crash, the IDE points either to the last line of a random unit (with a column 50,000 or above), or at some 'interface' definition of an generic object definition.
--- End quote ---
I agree the cause can be the use of generics, but many of these issues are fixed in trunk, some back-ported to 3.2.3 /3.4 Rc
Navigation
[0] Message Index
[#] Next page