Forum > General

Error: Compilation raised exception internally

(1/1)

440bx:
Hello,

I wanted to use FpDbgDwarfVerbosePrinter in DwarfViewer. 

To that effect, I added the unit FpDbgDwarfVerbosePrinter in the implementation part of FpDbgDwarfDataClasses.    After adding the unit, the implementation looks like 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";}};} ---IMPLEMENTATION  uses                            // !! added  FpDbgDwarfVerbosePrinter      // !! added  ;                             // !! added   var  FPDBG_DWARF_ERRORS,  FPDBG_DWARF_WARNINGS,  FPDBG_DWARF_SEARCH,  FPDBG_DWARF_VERBOSE,  // FPDBG_DWARF_DATA_WARNINGS,  FPDBG_DWARF_VERBOSE_LOAD    : PLazLoggerLogGroup;   { followed by several thousand lines of code } 
After adding that unit, the attempt to rebuild the program produced the following:
--- Code: Text  [+][-]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";}};} ---Free Pascal Compiler version 3.3.1-12125-g7da8c774be [2022/11/21] for x86_64Copyright (c) 1993-2022 by Florian Klaempfl and others(1002) Target OS: Win64 for x64(3104) Compiling fpdebug.pas(3104) Compiling fpdbgdwarfdataclasses.pasError: (1026) Compilation raised exception internallyFatal: (1018) Compilation abortedAn unhandled exception occurred at $0000000100026B17:EListError: List index exceeds bounds (1754)  $0000000100026B17  RAISEINDEXERROR,  line 717 of cclasses.pas  $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas  $000000010013448B  LOAD_USEDUNITS,  line 1898 of fppu.pas  $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas  $00000001001EE091  LOADUNITS,  line 543 of pmodules.pas  $00000001001EF3F5  PROC_UNIT,  line 1098 of pmodules.pas  $0000000100043EE3  COMPILE,  line 403 of parser.pas  $0000000100134FA9  LOADPPU,  line 2281 of fppu.pas  $000000010013465B  LOAD_USEDUNITS,  line 1960 of fppu.pas  $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas  $00000001001EE091  LOADUNITS,  line 543 of pmodules.pas  $00000001001EF090  PROC_UNIT,  line 1003 of pmodules.pas  $0000000100043EE3  COMPILE,  line 403 of parser.pas  $000000010001AA5A  COMPILE,  line 291 of compiler.pas  $0000000100001AED  main,  line 301 of pp.pas  $00000001000022C6  MAIN_WRAPPER  $00000001000137E0  EXE_ENTRY,  line 83 of x86_64/cpuwin.inc Error: D:\Laz64trunk\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode Basically, FPC didn't like that additional unit in that location.

Suggestions on how to fix the problem on my end (if it is possible) are welcome and appreciated.

Thank you.


ETA:

Lazarus version 2.3.0 with FPC 3.3.1 revision main-2-3-2911 (O/S as stated in the signature)

jamie:
Well look at that will yah! You broke the bloody ship!

Thaddy:
That is not that easy. FpDbgDwarfVerbosePrinter  should be initialized in the same way that e.g heaptrc is initialized, so it needs a compiler change....(i.e. before you even see the uses clause)
Well, maybe you have enough information now. Good luck.

Navigation

[0] Message Index

Go to full version