Recent

Author Topic: FPC still give me error and shows Fatal:Internal Error 2006012304  (Read 1627 times)

TYDQ

  • Full Member
  • ***
  • Posts: 104
With friends' instruction,I make a minimal code to reproduce the error(My FPC Version is 3.3.1,Which is the newest version in gitlab and whatever the CPU target is,it still give me the same error which is on the title).
null.pas:
Code: Pascal  [Select][+][-]
  1. unit null;
  2.  
  3. interface
  4.  
  5. implementation
  6.  
  7. end.
system.pas(Same as in the fpc wiki):
Code: Pascal  [Select][+][-]
  1. unit system;
  2.  
  3. {$MODE FPC}
  4.  
  5. interface
  6.  
  7.   type
  8.     cardinal = 0..$FFFFFFFF;
  9.     hresult = cardinal;
  10.     dword = cardinal;
  11.     integer = longint;
  12.  
  13.     pchar = ^char;
  14.  
  15.     { That part comes from fpc 3.2.0 as nessesary}
  16.     TTypeKind = (tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkSet,
  17.     tkMethod, tkSString, tkLString, tkAString, tkWString, tkVariant, tkArray,
  18.     tkRecord, tkInterface, tkClass, tkObject, tkWChar, tkBool, tkInt64, tkQWord,
  19.     tkDynArray, tkInterfaceRaw, tkProcVar, tkUString, tkUChar, tkHelper, tkFile,
  20.     tkClassRef, tkPointer);
  21.  
  22.     jmp_buf = packed record
  23.       rbx, rbp, r12, r13, r14, r15, rsp, rip: QWord;
  24.       {$IFDEF win64}
  25.       rsi, rdi: QWord;
  26.       xmm6, xmm7, xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15: record
  27.         m1, m2: QWord;
  28.       end;
  29.  
  30.       mxcsr: LongWord;
  31.       fpucw: word;
  32.       padding: word;
  33.       {$ENDIF win64}
  34.     end;
  35.  
  36.     Pjmp_buf = ^jmp_buf;
  37.     PExceptAddr = ^TExceptAddr;
  38.     TExceptAddr = record
  39.       buf: Pjmp_buf;
  40.       next: PExceptAddr;
  41.       {$IFDEF CPU16}
  42.       frametype: SmallInt;
  43.       {$ELSE CPU16}
  44.       frametype: LongInt;
  45.       {$ENDIF CPU16}
  46.     end;
  47.  
  48.     PGuid = ^TGuid;
  49.     TGuid = packed record
  50.       case Integer of
  51.       1:
  52.       (Data1: DWord;
  53.         Data2: word;
  54.         Data3: word;
  55.         Data4: array [0 .. 7] of byte;
  56.       );
  57.       2:
  58.       (D1: DWord;
  59.         D2: word;
  60.         D3: word;
  61.         D4: array [0 .. 7] of byte;
  62.       );
  63.       3:
  64.       ( { uuid fields according to RFC4122 }
  65.         time_low: DWord; // The low field of the timestamp
  66.         time_mid: word; // The middle field of the timestamp
  67.         time_hi_and_version: word;
  68.         // The high field of the timestamp multiplexed with the version number
  69.         clock_seq_hi_and_reserved: byte;
  70.         // The high field of the clock sequence multiplexed with the variant
  71.         clock_seq_low: byte; // The low field of the clock sequence
  72.         node: array [0 .. 5] of byte; // The spatially unique node identifier
  73.       );
  74.     end;
  75.  
  76. { --- End of nessesary part --- }
  77.  
  78. implementation
  79.  
  80. end.
And my command is:
Code: Bash  [Select][+][-]
  1. tydq@192:~/Test$ /home/tydq/source/compiler/ppcrossa64 -n -O- -Si -Sc -Sg -Xd -CX -XXs -Tlinux -Cg null.pas
  2.  
(/home/tydq/source/compiler/ppcrossa64 is the path of the compiler)
And this is the error shown:
null.pas(3,10) Fatal: Internal error 2006012304
Fatal: Compilation aborted
Does anyone know how to edit the symbase.pas and make it correct or other ways to solve the error?

Thaddy

  • Hero Member
  • *****
  • Posts: 16300
  • Censorship about opinions does not belong here.
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #1 on: May 26, 2024, 03:15:42 pm »
Do NOT touch symbase, please. EVER. Do what I told you.
All other compilers rely on it being sound code. It is back-end independent.
Search for your error elsewhere. You made a logic error, now go and find it!
Again, do not touch symbase, because the error is not there. It only reveals your bug and that is what that code is supposed to do.
The error is somewhere in YOUR code!
Focussing on symbase is the wrong approach and doomed, deemed to fail.

And I still don't see a stack-trace from the FPC call stack, not this particular stack.

Did you even make a stack trace? Because that can reveal where the faulty call comes from. (I assume you built your compiler in debug mode?)
« Last Edit: May 26, 2024, 03:29:52 pm by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11980
  • FPC developer.
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #2 on: May 26, 2024, 05:00:09 pm »
That probably means your system unit is incomplete.

It is better to shave down the existing unit bit by bit than to make your own one.

TYDQ

  • Full Member
  • ***
  • Posts: 104
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #3 on: May 27, 2024, 06:14:53 am »
Do NOT touch symbase, please. EVER. Do what I told you.
All other compilers rely on it being sound code. It is back-end independent.
Search for your error elsewhere. You made a logic error, now go and find it!
Again, do not touch symbase, because the error is not there. It only reveals your bug and that is what that code is supposed to do.
The error is somewhere in YOUR code!
Focussing on symbase is the wrong approach and doomed, deemed to fail.

And I still don't see a stack-trace from the FPC call stack, not this particular stack.

Did you even make a stack trace? Because that can reveal where the faulty call comes from. (I assume you built your compiler in debug mode?)
I never touch symbase because I don't understand how to symbase.pas works.
I built my compiler is in debug mode,maybe that's where error occurs?
« Last Edit: May 27, 2024, 06:50:41 am by TYDQ »

TYDQ

  • Full Member
  • ***
  • Posts: 104
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #4 on: May 27, 2024, 06:16:42 am »
That probably means your system unit is incomplete.

It is better to shave down the existing unit bit by bit than to make your own one.
OK,so the lazarus wiki for self written system.pas should not be referred to?(the wiki uses FPC 3.2.0)

TYDQ

  • Full Member
  • ***
  • Posts: 104
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #5 on: May 27, 2024, 08:37:37 am »
That probably means your system unit is incomplete.

It is better to shave down the existing unit bit by bit than to make your own one.
I solved the problem interal error 2006012304.Compiling system.pas is a must to build the project.

Key-Real

  • Sr. Member
  • ****
  • Posts: 372
Re: FPC still give me error and shows Fatal:Internal Error 2006012304
« Reply #6 on: June 04, 2024, 08:51:43 am »
Yes, compiling the system unit is a must.

I had simelar issue.

I think is very unlucky compiler drops an internal error insteed of telling us "please compile the system unit first"

 

TinyPortal © 2005-2018