The problem of building software in Lazarus 2.1.0 svn > 63557
Original Reporter info from Mantis: zero258S
-
Reporter name: Ivon
Original Reporter info from Mantis: zero258S
- Reporter name: Ivon
Description:
The problem of building software in Lazarus 2.1.0 svn > 63557.
When building programs, a message is displayed at the end:
/usr/local/share/lazarus/lcl/interfaces/./gtk2/alllclintfunits.pas(35,3) Hint: (5023) Unit "Gtk2WSStdCtrls" not used in AllLCLIntfUnits
(1008) 60875 lines compiled, 2.1 sec
(1021) 3 warning(s) issued
(1022) 1323 hint(s) issued
(1023) 73 note(s) issued
An unhandled exception occurred at $0000000000526F42:
EAccessViolation: Access violation
$0000000000526F42 LEAVECRITICALSECTION, line 1237 of ideexterntoolintf.pas
Hint: (lazarus) Missing state file of cmdbox 0.0: /media/u1/s1/Linux/Commander/Dc/SVN/doublecmd/components/CmdLine/lib/x86_64-linux/cmdbox.compiled
$0000000000A6614C SETTHREAD, line 475 of exttools.pas
$0000000000A6A2A4 SETTOOL, line 1391 of exttools.pas
$0000000000A6B53E DESTROY, line 1697 of exttools.pas
Interestingly, this problem has already occurred in Lazarus:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943600
https://bugs.freepascal.org/view.php?id=36318
Steps to reproduce:
make clean bigide
make install
Additional information:
In "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943600" it was suggested that we should introduce a delay time when using these procedures.
I added this trace and, apparently, it became this delay, and the build of programs in Lazarus began to run normally again.
The solution was simple:
lazarus/components/buildintf/ideexterntoolintf.pas:
uses
Classes, SysUtils, Math, Laz_AVL_Tree,
// LazUtils
UTF8Process, LazFileUtils, LazFileCache, LazMethodList, LazLoggerBase,
// BuildIntf
BuildStrConsts, //;
Crt; // my adding 2020-10-07 20:52
procedure TAbstractExternalTool.EnterCriticalSection;
begin
// WriteLn('+TAbstractExternalTool.EnterCriticalSection: FWorkerMessages = ', HexStr(FWorkerMessages)); // My adding for trace
Delay(1);
FWorkerMessages.EnterCriticalSection;
// WriteLn('-TAbstractExternalTool.EnterCriticalSection'); // My adding for trace
end;
procedure TAbstractExternalTool.LeaveCriticalSection;
begin
Delay(1);
Assert(Assigned(FWorkerMessages), 'TAbstractExternalTool.LeaveCriticalSection: FWorkerMessages=Nil.');
// WriteLn('+TAbstractExternalTool.LeaveCriticalSection: FWorkerMessages = ', HexStr(FWorkerMessages)); // My adding for trace
FWorkerMessages.LeaveCriticalSection;
// WriteLn('-TAbstractExternalTool.LeaveCriticalSection'); // My adding for trace
end;
We added the line "Delay(1)" and everything was compiled without errors.