Recent

Author Topic: Сompilation floating error  (Read 707 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Сompilation floating error
« on: September 30, 2022, 10:43:26 am »
Preamble: I hesitated to create this topic for a long time, but too often a mistake makes me do it.

So, for about 1 year now, I've been seeing a project build error that always points to the same module. She appears from time to time. When rebuilding an unmodified project, the error does not appear and the project starts without errors. As the project grows, the error shows up more often.

The error appears regardless of whether I first build the project (Shift + F9) or immediately run with debugging (F9).

I get this error on any platform I run the project on (Win x64/Debian 11 (gtk2/qt5)/Darwin (Monterey))

I ask the main maintainers to look at what is the likely cause of the bug. Not sure if I can reproduce this error in a test project. Therefore, I am ready to give the maintainers full access to the source code in a private repository.

I hope for your attention.

I use:
FPC revision: git_start-3099-g8c9a07a3e8
Lazarus revision: main-2_3-2276-g1c7122b6ca

« Last Edit: September 30, 2022, 09:24:33 pm by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

MarkMLl

  • Hero Member
  • *****
  • Posts: 5564
Re: Сompilation floating error
« Reply #1 on: September 30, 2022, 10:58:43 am »
One question, one suggestion.

When you have the error, are a Run -> Compile and Run -> Build consistent? What happens if you do a File -> Clean Directory... first? There is an extremely elusive problem that some of us have seen but is similarly difficult to track down, possibly related to having pathnames in compiler options and/or uses clauses.

Please edit your message to put the compiler version etc. in the body, not in your signature. Having it in your sig is the worst possible place, since when you change your sig there will no longer be an indication in this thread of what version you're using which makes it worse than useless when Google or the forum's search facility brings somebody else here.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #2 on: September 30, 2022, 12:20:45 pm »
Hi MarkMLl.

Thanks for the hints.  I will correct the first post and add new details a bit later. I am currently away from my PC
« Last Edit: September 30, 2022, 12:22:32 pm by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

Warfley

  • Hero Member
  • *****
  • Posts: 941
Re: Сompilation floating error
« Reply #3 on: September 30, 2022, 01:48:25 pm »
From my experience, when you are working a lot with generics, the "compilation raised exception internally" is something you encounter regularly as soon as the project grows large enough. But on the bright side you get used to. Often the "fix" is just to move a few things around in different units, make un-nest things, move functions from your class into class helpers, etc.
With a bit trial and error you can get around this

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #4 on: September 30, 2022, 09:27:15 pm »
Please edit your message to put the compiler version etc.

Done
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #5 on: September 30, 2022, 09:30:46 pm »
From my experience, when you are working a lot with generics, the "compilation raised exception internally" is something you encounter regularly as soon as the project grows large enough. But on the bright side you get used to.
Hi Warfley.

I do use generics quite often in my project. And I also had some hunches about generics. But I don't use generics in the exact unit where I get the error.
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

Thaddy

  • Hero Member
  • *****
  • Posts: 12194
Re: Сompilation floating error
« Reply #6 on: September 30, 2022, 09:31:10 pm »
1. provide compilable code
2. if that is not possible provide code that does not compile but you expect to compile.
3. No code, no answers.
Manuals, manuals, manuals first.
You have incompetence and sheer incompetence.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #7 on: September 30, 2022, 10:12:48 pm »
Hi Thaddy

In the initial post, I wrote that the project is private and I would not like to post it to the public. I'm not sure if I can reproduce the issue on a test project. But I can link to it for just about anyone who wants to look at the code.

I sent you a link to the archive with the project in the PM
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

Josh

  • Hero Member
  • *****
  • Posts: 1024
Re: Сompilation floating error
« Reply #8 on: September 30, 2022, 10:58:19 pm »
could it be ptrint , using negative numbers,
https://www.freepascal.org/docs-html/rtl/system/ptrint.html
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #9 on: September 30, 2022, 11:59:25 pm »
could it be ptrint , using negative numbers,
https://www.freepascal.org/docs-html/rtl/system/ptrint.html
Hi Josh

Thanks for the idea. I have made some corrections in the code. So far no errors have appeared. But I will be watching for some time.

Upd: I have to report that the errors are still repeated.  :'(
« Last Edit: October 01, 2022, 12:39:59 am by zoltanleo »
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

zamtmn

  • Hero Member
  • *****
  • Posts: 523
Re: Сompilation floating error
« Reply #10 on: October 01, 2022, 12:50:42 am »
Build fpc with debug information and give the error stack. Also you need make a minimal example reproducing the bug

Josh

  • Hero Member
  • *****
  • Posts: 1024
Re: Сompilation floating error
« Reply #11 on: October 01, 2022, 09:19:11 am »
Is the error there when compiled with all optimization levels?
Any particular compiler options used, that could be causing the issue.
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 448
Re: Сompilation floating error
« Reply #12 on: October 01, 2022, 09:53:42 am »
Hi Josh.

I answered to PM
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by Rik

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018