[lazbuild] [patch] Lazbuild randomly aborts project building process.
Original Reporter info from Mantis: Cyrax
-
Reporter name:
Original Reporter info from Mantis: Cyrax
- Reporter name:
Description:
procedure TExternalToolThread.SetTool(AValue: TExternalTool); begin if FTool=AValue then Exit; if FTool&LtPos;>nil then FTool.Thread:=nil; FTool:=AValue; if FTool&LtPos;>nil then FTool.Thread:=Self; end;
destructor TExternalToolThread.Destroy; begin Tool:=nil; inherited Destroy; end;
Setting FTool field to NIL (aka trying to prepare it and thread associated to it to be destroyed as well) via property setter causes already running thread to product an access violation and thus breaking the build process along side of it.
Attached patch will fix this by accessing FTool field directly.
Valgrind didn't show any leaks.