Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
TProcess freeze
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Can /my/ AI help me with ...
by
microxa
[
Today
at 05:10:10 pm]
Implementing an Elo ratin...
by
RossAtkins47
[
Today
at 04:22:47 pm]
[SOLVED]Program experienc...
by
tetrastes
[
Today
at 04:15:08 pm]
[New Component] ExtTabCtr...
by
wp
[
Today
at 03:50:20 pm]
RunFormula: math expressi...
by
stormray
[
Today
at 03:30:10 pm]
Error with last fixes_3.2...
by
patyit
[
Today
at 01:54:04 pm]
Message CM_ShowingChanged...
by
AlexTP
[
Today
at 01:21:03 pm]
Single and Double, Conver...
by
MathMan
[
Today
at 10:36:23 am]
MOVED: Eye Candy TESCheme
by
theo
[
Today
at 10:06:43 am]
Which Control should I us...
by
J-G
[
Today
at 09:34:46 am]
storing assets for releas...
by
Handoko
[
Today
at 08:35:23 am]
What am I missing here? [...
by
Handoko
[
Today
at 05:45:28 am]
TCHATGPT — An Artificial ...
by
marcelomaurinmartins@gmai
[
Today
at 02:20:11 am]
Mundo Medieval 3D MMORPG ...
by
Rodrigo Robles
[June 14, 2026, 05:26:38 pm]
Fast Canvas Library V1.05...
by
Gigatron
[June 14, 2026, 04:57:35 pm]
SynEdit theme
by
LemonParty
[June 14, 2026, 02:01:33 pm]
What happened to CocoaWSC...
by
Frank
[June 14, 2026, 01:31:19 pm]
Very rough version of a s...
by
Hansvb
[June 14, 2026, 12:44:31 pm]
Pdf Viewer in Pascal
by
Dzandaa
[June 14, 2026, 11:44:26 am]
Lazarus Bugfix Release 4....
by
Martin_fr
[June 13, 2026, 11:02:41 pm]
Lazarus 4.8 on Sourceforg...
by
Enos68
[June 13, 2026, 08:00:47 pm]
Conscious Artificial Inte...
by
Dzandaa
[June 13, 2026, 05:59:22 pm]
If FileExists(
by
Bart
[June 13, 2026, 05:57:26 pm]
docked IDE and form capti...
by
Paolo
[June 13, 2026, 02:53:50 pm]
New version of LazMapView...
by
wp
[June 13, 2026, 12:09:27 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: TProcess freeze (Read 514 times)
LemonParty
Hero Member
Posts: 535
TProcess freeze
«
on:
June 12, 2025, 04:07:43 pm »
I have this code, that by design should compile several units:
Code: Pascal
[Select]
[+]
[-]
P
.
Executable
:
=
CFPC
;
P
.
Options
:
=
P
.
Options
+
[
poWaitOnExit
,
poUsePipes
]
;
Writeln
(
'---32 bit targets---'
)
;
for
i
:
=
0
to
High
(
CUnitNames
)
do
begin
Write
(
' COMPILING '
,
CUnitNames
[
i
]
)
;
P
.
Parameters
[
0
]
:
=
CUnitNames
[
i
]
;
P
.
Execute
;
SL
.
LoadFromStream
(
P
.
Output
)
;
if
P
.
ExitCode
=
0
then
Writeln
(
' OK'
)
else
Writeln
(
SL
.
Text
)
;
end
;
P is TProcess, SL – TStringList. When I run this code it freeze at P.Execute. What the problem?
«
Last Edit: June 12, 2025, 04:10:58 pm by LemonParty
»
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
marcov
Administrator
Hero Member
Posts: 12902
FPC developer.
Re: TProcess freeze
«
Reply #1 on:
June 12, 2025, 04:26:24 pm »
Search for large output here, and implement it.
https://wiki.freepascal.org/Executing_External_Programs
Logged
LemonParty
Hero Member
Posts: 535
Re: TProcess freeze
«
Reply #2 on:
June 12, 2025, 05:01:28 pm »
No, still freeze.
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
marcov
Administrator
Hero Member
Posts: 12902
FPC developer.
Re: TProcess freeze
«
Reply #3 on:
June 12, 2025, 05:05:03 pm »
Then you maybe need stderr processing too, see implementation of runcommandloop. (or use runcommand)
Logged
LemonParty
Hero Member
Posts: 535
Re: TProcess freeze
«
Reply #4 on:
June 12, 2025, 05:47:18 pm »
I solved this by using RunCommandInDir this way:
Code: Pascal
[Select]
[+]
[-]
RunCommandInDir
(
''
,
CFPC
,
RunSwitches
,
Output
,
ExitCode
)
RunCommandInDir by default wait until process finish.
Thank you for help.
Logged
Lazarus v. 4.99. FPC v. 3.3.1. Windows 11
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
TProcess freeze
TinyPortal
© 2005-2018