Recent

Author Topic: I'm getting Fatal: Internal error 200706102  (Read 3390 times)

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
I'm getting Fatal: Internal error 200706102
« on: August 08, 2025, 06:29:40 pm »
I'm getting Fatal: Internal error 200706102
Should I submit a bug report?
The only problem is that there is about 5000 lines of code.

Thaddy

  • Hero Member
  • *****
  • Posts: 18374
  • Here stood a man who saw the Elbe and jumped it.
Re: I'm getting Fatal: Internal error 200706102
« Reply #1 on: August 08, 2025, 06:47:04 pm »
You should ALWAYS file a bug report against an internal error even if you made a mistake.
The error is in symtype.pas and indicates a signed integer overflow. Grep is your friend.

But it is really helpful if you can reduce the error to a simple example.
Try to compile with {$Q+}{$R+} that may catch the error before it runs to the internal error.
Also, if possible, provide the call stack because the location I gave is not the cause.
« Last Edit: August 08, 2025, 06:56:25 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
Re: I'm getting Fatal: Internal error 200706102
« Reply #2 on: August 08, 2025, 07:20:39 pm »
But it is really helpful if you can reduce the error to a simple example.
I will try, but reducing 5000 lines of code down to a simple example will not be easy.
I can, however add to my report, that I have a define that controls inlining of functions, like this:
Code: Pascal  [Select][+][-]
  1. program f1;
  2. {$define inline_functions}  // if I comment-out this line in my code the fatal error goes away
  3. function f:integer;  {$ifdef inline_functions} inline; {$endif}
  4. begin
  5. result:=0;
  6. end;
  7. begin
  8. f;
  9. end.
Note: the above example code is just an illustration of the problem and how I can make the problem go away in my code; the example works ok and does not reproduce the fatal error.
I can also report that the error only happens with the 32 bit compiler; the 64 bit compiler works ok.
I tried {$Q+}{$R+} but I still get the error.
« Last Edit: August 08, 2025, 07:26:42 pm by ad1mt »

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
Re: I'm getting Fatal: Internal error 200706102
« Reply #3 on: August 08, 2025, 07:29:40 pm »
Also, if possible, provide the call stack because the location I gave is not the cause.
Where do I find the call stack of the compiler?

Thaddy

  • Hero Member
  • *****
  • Posts: 18374
  • Here stood a man who saw the Elbe and jumped it.
Re: I'm getting Fatal: Internal error 200706102
« Reply #4 on: August 08, 2025, 07:39:35 pm »
compile the compiler with debug info? That has been explained many times.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
Re: I'm getting Fatal: Internal error 200706102
« Reply #5 on: August 10, 2025, 09:29:33 am »
I've attempted to narrow down the cause of the problem...
(a) only happens when functions are inlined (but unable to narrow down which function because there are too many inlined functions).
(b) only happens with the 32bit compiler
(c) problem goes away if I use 64bit integers
(c) only happens in the latest version of my code, previous versions worked ok. There are not many differences between the two versions.
I'm happy to supply the two versions of the code in a bug report if you wish.

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 302
  • I use FPC [main] 💪🐯💪
Re: I'm getting Fatal: Internal error 200706102
« Reply #6 on: August 10, 2025, 09:53:09 am »
If your code is open source, you can post it or provide a link. For example, I really enjoy minimizing large chunks of code with errors to the minimum reproducible form, and perhaps I could do that
I may seem rude - please don't take it personally

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11827
  • Debugger - SynEdit - and more
    • wiki
Re: I'm getting Fatal: Internal error 200706102
« Reply #7 on: August 10, 2025, 10:20:50 am »
Looking through the compiler source
Code: Pascal  [Select][+][-]
  1.     procedure Tcompilerppufile.putexprint(const v:Tconstexprint);
  2.  
  3.     begin
  4.       if v.overflow then
  5.         internalerror(200706102);
  6.  

So, only 32bit could be explained, as an overflow may be more likely.

I guess the actual error is that the compiler does not check and report the overflow where it happens. Instead it come to a halt when it writes the PPU file.

As for the rest, I don't know.

(If you have a compiler build with -gl then you should get a trace, and you could attach that to a bug report)

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
Re: I'm getting Fatal: Internal error 200706102
« Reply #8 on: August 10, 2025, 07:11:31 pm »
Bad news I'm afraid.
With the lastest version of my code, the 64bit compiler has also started crashing when functions are inlined.
unit_test_1_v28_XV.lpr(167,14) Error: Internal error 200510032
I've had to permanently turn off inlining of functions.
The source is a library and available from github...
 library code is here:  https://github.com/ad1mt/Multi-Word-Int-5/blob/main/src/Multi_Int_XV.zip
 test/demo programs are here:  https://github.com/ad1mt/Multi-Word-Int-5/blob/main/demo/Demo_XV.zip
To trigger the error, you must edit the file "Unit_Multi_Int_XV.pas", and uncomment the line that reads "{$define inline_functions_level_1}", then build any of the test or demo programs.
Alternatively, the code is also available from my web page here:  https://mark-taylor.me.uk/downloads/Multi_Int_5.10.zip

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 302
  • I use FPC [main] 💪🐯💪
Re: I'm getting Fatal: Internal error 200706102
« Reply #9 on: August 11, 2025, 07:11:25 am »
To trigger the error, you must edit the file "Unit_Multi_Int_XV.pas", and uncomment the line that reads "{$define inline_functions_level_1}", then build any of the test or demo programs.

I tested your code on 🥲FPC 3.2.2🥲 (Windows):
x32 - error: IE 200706102 ❌
x64 - error: IE 200510032 ❌

I also tested it on 🪄FPC [git main]🪄 (Windows):
x32, x64 - everything compiles successfully! ✅

This is in response to the question that FPC3.2.2 is very outdated and there has long been a desire for the next release with bug fixes for those who develop libraries. For those who simply create software and do not need to maintain compatibility with 3.2.2, they have been happily using the FPC[git main] version for a long time! (IMHO)

Therefore, I apologize, but since the error does not occur in the latest version of the compiler, I will not look for the cause.

Only if someone tests it on 3.2.4 and says that it occurs there, I can continue testing if necessary.
I may seem rude - please don't take it personally

ad1mt

  • Sr. Member
  • ****
  • Posts: 465
    • Mark Taylor's Home Page
Re: I'm getting Fatal: Internal error 200706102
« Reply #10 on: August 11, 2025, 06:57:10 pm »
This is in response to the question that FPC3.2.2 is very outdated and there has long been a desire for the next release with bug fixes for those who develop libraries. For those who simply create software and do not need to maintain compatibility with 3.2.2, they have been happily using the FPC[git main] version for a long time! (IMHO)
That is good news. I'm not going to worry about it any more.
I will upgrade to FPC3.2.4 as soon as it is officially released.
Thanks for investigating.

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 302
  • I use FPC [main] 💪🐯💪
Re: I'm getting Fatal: Internal error 200706102
« Reply #11 on: August 11, 2025, 07:52:48 pm »
I will upgrade to FPC3.2.4 as soon as it is officially released.

You can also try to stay on the cutting edge by installing the latest version of Lazarus and FPC from the git repository. It's like fresh hot pies!
There is a way for those who like the command line and console. There is also a way for those who are used to the GUI.

I myself use the GUI option, although I have tried the command line, but so far I have not found anything that the GUI tool does not give me.

Therefore, I can recommend a tool for installing the latest versions of software - https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

I may seem rude - please don't take it personally

ALLIGATOR

  • Sr. Member
  • ****
  • Posts: 302
  • I use FPC [main] 💪🐯💪
Re: I'm getting Fatal: Internal error 200706102
« Reply #12 on: August 11, 2025, 07:53:23 pm »
Overall, it's not complicated:
1. Specify the path where the source files will be downloaded and where FPC and Lazarus will be installed.
2. Go to the “Basic” tab.
3. Select Trunk from the list of FPC and Lazarus items—this means the latest versions!
4. Install FPC and Lazarus. Compilation will begin; the duration depends on the power of your computer, but it will take about 15 minutes.
5. If you also need a 32-bit compiler (by default, only the x64 compiler will be installed on an x64 system in the previous step), switch to the “Cross” tab.
6. Select the CPU architecture for which you need the compiler (i386).
7. And the operating system (probably Linux if you are on Linux, or Windows if you are on Windows) — I have Windows because I am on Windows.
8. Click “Install compiler” - this will install an additional compiler (x86) - so that you can compile both x64 and x32 applications.
9. Done! You are now the proud owner of enormous power! )
I may seem rude - please don't take it personally

PascalDragon

  • Hero Member
  • *****
  • Posts: 6195
  • Compiler Developer
Re: I'm getting Fatal: Internal error 200706102
« Reply #13 on: August 14, 2025, 08:39:38 pm »
This is in response to the question that FPC3.2.2 is very outdated and there has long been a desire for the next release with bug fixes for those who develop libraries. For those who simply create software and do not need to maintain compatibility with 3.2.2, they have been happily using the FPC[git main] version for a long time! (IMHO)
That is good news. I'm not going to worry about it any more.
I will upgrade to FPC3.2.4 as soon as it is officially released.
Thanks for investigating.

You should try with the 3.2.4-rc1 whether the issue still occurs there. If it does then you should definitely investigate to minimize your issue.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11827
  • Debugger - SynEdit - and more
    • wiki
Re: I'm getting Fatal: Internal error 200706102
« Reply #14 on: August 14, 2025, 08:49:54 pm »
If you are on Windows, there is a snapshot installer for Lazarus (or you can just download the RC from the fpc site).

This is Lazarus 4.2 with FPC 3.2.4RC1
https://sourceforge.net/projects/lazarus-snapshots/files/Window%2064/2025-07%20Lazarus%204.2%20with%20FPC%203.2.4-RC1%20(56baf314b5eb)/
You only need the file lazarus-4.2-fpc-3.2.4-rc1-56baf314b5eb-win64.exe

If you go up one folder there is a 32 bit version too.

 

TinyPortal © 2005-2018