Recent

Author Topic: Error: Compilation raised exception internally  (Read 147 times)

440bx

  • Hero Member
  • *****
  • Posts: 3268
Error: Compilation raised exception internally
« on: November 28, 2022, 10:29:37 pm »
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  [Select][+][-]
  1. IMPLEMENTATION
  2.  
  3.  
  4. uses                            // !! added
  5.   FpDbgDwarfVerbosePrinter      // !! added
  6.   ;                             // !! added
  7.  
  8.  
  9.  
  10. var
  11.   FPDBG_DWARF_ERRORS,
  12.   FPDBG_DWARF_WARNINGS,
  13.   FPDBG_DWARF_SEARCH,
  14.   FPDBG_DWARF_VERBOSE,
  15.   // FPDBG_DWARF_DATA_WARNINGS,
  16.   FPDBG_DWARF_VERBOSE_LOAD    : PLazLoggerLogGroup;
  17.  
  18.   { followed by several thousand lines of code }
  19.  

After adding that unit, the attempt to rebuild the program produced the following:
Code: Text  [Select][+][-]
  1. Free Pascal Compiler version 3.3.1-12125-g7da8c774be [2022/11/21] for x86_64
  2. Copyright (c) 1993-2022 by Florian Klaempfl and others
  3. (1002) Target OS: Win64 for x64
  4. (3104) Compiling fpdebug.pas
  5. (3104) Compiling fpdbgdwarfdataclasses.pas
  6. Error: (1026) Compilation raised exception internally
  7. Fatal: (1018) Compilation aborted
  8. An unhandled exception occurred at $0000000100026B17:
  9. EListError: List index exceeds bounds (1754)
  10.   $0000000100026B17  RAISEINDEXERROR,  line 717 of cclasses.pas
  11.   $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas
  12.   $000000010013448B  LOAD_USEDUNITS,  line 1898 of fppu.pas
  13.   $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas
  14.   $00000001001EE091  LOADUNITS,  line 543 of pmodules.pas
  15.   $00000001001EF3F5  PROC_UNIT,  line 1098 of pmodules.pas
  16.   $0000000100043EE3  COMPILE,  line 403 of parser.pas
  17.   $0000000100134FA9  LOADPPU,  line 2281 of fppu.pas
  18.   $000000010013465B  LOAD_USEDUNITS,  line 1960 of fppu.pas
  19.   $0000000100134D6A  LOADPPU,  line 2226 of fppu.pas
  20.   $00000001001EE091  LOADUNITS,  line 543 of pmodules.pas
  21.   $00000001001EF090  PROC_UNIT,  line 1003 of pmodules.pas
  22.   $0000000100043EE3  COMPILE,  line 403 of parser.pas
  23.   $000000010001AA5A  COMPILE,  line 291 of compiler.pas
  24.   $0000000100001AED  main,  line 301 of pp.pas
  25.   $00000001000022C6  MAIN_WRAPPER
  26.   $00000001000137E0  EXE_ENTRY,  line 83 of x86_64/cpuwin.inc
  27.  
  28. Error: D:\Laz64trunk\fpc\bin\x86_64-win64\ppcx64.exe returned an error exitcode
  29.  
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)
« Last Edit: November 28, 2022, 10:33:25 pm by 440bx »
FPC v3.0.4 and Lazarus 1.8.2 on Windows 7 SP1 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 5069
Re: Error: Compilation raised exception internally
« Reply #1 on: November 29, 2022, 01:54:48 pm »
Well look at that will yah! You broke the bloody ship!
The only true wisdom is knowing you know nothing

Thaddy

  • Hero Member
  • *****
  • Posts: 12619
Re: Error: Compilation raised exception internally
« Reply #2 on: November 29, 2022, 02:31:20 pm »
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.
« Last Edit: November 29, 2022, 02:33:50 pm by Thaddy »
The only thing I can say about Putin - born st Petersburg- is that he is indeed Russian, as opposed to Stalin, who was Georgian. Depending of historical time frame they could both be Lithuanian or Polish...even German. Shut him up!

 

TinyPortal © 2005-2018