View Issue Details

IDProjectCategoryView StatusLast Update
0019997LazarusIDEpublic2019-04-22 19:33
ReporterMartin FriebeAssigned ToVincent Snijders 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version1.3 (SVN) 
Summary0019997: Leak of 2 handles, each time project is compiled (not run)
DescriptionEach time a project (same project) is compiled) 2 handles are leaked by Lazarus.
(tested on w32 vista)

There is no need to run the project, simply compile it over and over again.

The leak can be seen using process explorer.

One leak is:
  Type Process (gpc.exe) references 2
However: the fpc process is no longer running (it is not in the process list)

I couldn't found the other handle, maybe process explore counts it twice.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

Vincent Snijders

2011-10-11 15:39

manager   ~0052865

This is caused by the fact that a single TProcess is used to run the compiler several times.

TProcess.Execute create process and thread handles, but they are not freed until TProcess.Destroy which calls TProcess.CloseProcessHandles.

I will ask on the fpc-pascal mailing list, how this should be solved.

Alexander Shishkin

2011-10-11 15:48

reporter   ~0052866

I think it will enough to call CloseProcessHandles (protected method of TProcess) before execute (in overriden execute).

Vincent Snijders

2011-10-13 11:05

manager   ~0052930

See: http://lists.freepascal.org/lists/fpc-pascal/2011-October/030381.html

Vincent Snijders

2014-09-25 10:15

manager   ~0077634

I cannot reproduce this anymore, so I assume this issue has been fixed.

Issue History

Date Modified Username Field Change
2011-08-16 15:44 Martin Friebe New Issue
2011-08-16 15:44 Martin Friebe LazTarget => -
2011-08-16 15:44 Martin Friebe Widgetset => Win32/Win64
2011-10-06 14:31 Vincent Snijders Status new => assigned
2011-10-06 14:31 Vincent Snijders Assigned To => Vincent Snijders
2011-10-11 15:39 Vincent Snijders Note Added: 0052865
2011-10-11 15:48 Alexander Shishkin Note Added: 0052866
2011-10-13 11:05 Vincent Snijders Note Added: 0052930
2014-09-25 10:15 Vincent Snijders Note Added: 0077634
2014-09-25 10:15 Vincent Snijders Status assigned => resolved
2014-09-25 10:15 Vincent Snijders Resolution open => fixed
2014-09-25 10:16 Vincent Snijders Fixed in Version => 1.3 (SVN)
2019-04-22 19:33 Martin Friebe Status resolved => closed