[fpc-devel] Tprocess using pipes, handle = 0
Martin Frb
lazarus at mfriebe.de
Mon Mar 16 23:03:46 CET 2015
This is based on a report I got. I can not reproduce myself. (I bcc the
reporter, and hope he will comment)
ON a 664 bit amd linux,
fpc_2.6.4-140420_amd64.deb (apparently the one from Lazarus sourceforge)
The problem started with an error launching the debugger.
Apparently the error occurs only, if the IDE is run without logging
(console or file), suggesting a timing issue. But not sure about it.
It also appears that the presence of the error relates to other errors
before. (*.ico file not found, but looking further I can not see how
this relates)
The IDE tries to run gdb (there is no variable here, at this time the
to-be-debugged-app is NOT yet accessed, nor is its path passed.
TProcess.Execute
(in components\lazdebuggergdbmi\cmdlinedebugger.pp ) is executed.
After that
Result := FDbgProcess.Running;
returns true (there is a check in the IDE code and it passes)
Then the IDE wants to read gdb output, and according to debugging
FDbgProcess.Output.Handle
is zero.
The IDE then creates an error due to that.
Further debugging was done, and the value of
FDbgProcess.FOutputStream.FHandle
was inspected immediately after
TProcess.Execute
It was zero already.
It is my understanding (from browsing the code), that if
TProcess.Execute is succesful, the handle will be set after it returns.
So if all reports I got are correct, then it looks like an issue in
TProcess.Execute.
Any ideas?
More information about the fpc-devel
mailing list