Do not only resolve (not just check) all warnings, but after you have done that compile with -glh first. (Run from a terminal window) That will reveal any memory leaks.
If something stops working after some time it is usually a memory issue.
After that, try to use the optimization you want and test again.
After that, follow up on the rest of Marco's advice.
Attached the .lpi file (zipped) with the compiler settings. Almost all settings are off. I exclusively use Lazarus. Any setting to change? Speed of final application is important.Well that does not tell me too much that would help.
Thanks for the hints.
I tested the compiler options but did not find any important error. Note that the problem occurs in compiling, not in the executing of the program. Linux is running in a virtual machine and in some cases it compiles fine but sometimes I get following errors:
- Failed to execute ppcx64.exe
- out of memory.
Not always. In some case it compiles and runs normally.
So in Windows, I started task manager. In some case it now compiles and works but in some cases PPCX64.exe eats all my memory, 2.7gbyte of 4gbytes, win10 64 bit system and the computer becomes very slow and then finally freezes.
So I have the impression FPC runs out of control and eats all the memory. The application HNSKY is about 40.000 lines long.
So any suggestion what to do next?
Han
Later, I tried the 32 bit compiler in a Win10 64 bit environment . Here Lazarus just stops compiling with error message "Fatal, no memory left" In task manager I see ppcxi386 using a lot of memory.
Make sure that you have set up enough swap space.Well... The compiler (not his own program) fails on its own recursion during optimization , so let's say put the swap space on infinite..... >:( >:( >:D >:D
Please report your findings in the bugtracker. Also, if you can test if FPC trunk behaves similarly.In trunk the internal implementation of case has been changed. trunk behaves ok. Tested windows and linux-arm r37005.
Also, similar problem appears when defining large array variables:That give a compiler warning.... Don't do that locally because it will blow up the stack, because inside a procedure,function it will be allocated on the stack. Declared globally there is no problem.
var LargeArray: array[0..99999999] of Integer;
Maybe, need some warning in compiler?
Done:No, done, but you should have checked trunk first.
https://bugs.freepascal.org/view.php?id=32311
Done:No, done, but you should have checked trunk first.
https://bugs.freepascal.org/view.php?id=32311