QProcess : Failed to start after after several successful launch
-
@jsulm said in QProcess : Failed to start after after several successful launch:
Do you terminate old processes? Did you check your OS logs?
For the old process, when it is not finidhed, i have this log : QProcess::start: Process is already running but I don't have that, I have failed to start.
For OS logs, I will watch when it happens again. I don't have this for the moment.Thank a lot for your answer.
-
@Arthux said in QProcess : Failed to start after after several successful launch:
QProcess::start: Process is already running
Sounds like you're reusing QProcess instance and the previously started process is still running.
-
@Arthux said in QProcess : Failed to start after after several successful launch:
QProcess::start: Process is already running.
I think this indicates that you are trying to re-use the same
QProcess
instance to run a new process when the previous one has not finished. Find out why the old invocation did not finish, andQProcess::terminate()
or evenkill()
if you have no alternative. -
@Arthux
But we are asking you whether you are re-using the sameQProcess
instance the second time youstart()
, when you have previously done astart()
on that same instance and the process has not yet stopped? that should be the cause of the error message you report? -
I think no, because the program is PS and run 1s max and I start the instance all minutes. I think the PS program is already stopped, no ?
When the program run again and you call start() function, you have QProcess::start: Process is already running. But I don't have this, I have "QProcess::FailedToStart".In documentation , Failed To Start error means "The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program." But it the same instance, same program, same arguments, so the program is not missing, I have sufficient permissions to invoke the program and I started it a lot of times before.
I do not know why at one point he stops throwing himself.
-
@Arthux
OK, understood. I don't know either, and I doubt it has anything to do with Qt or that you can find out more from Qt (you have put slot ontoerrorOccurred
, haven't you)? Maybe the board has run out of memory/processes?? Maybe the board does not allow you to run the same process if it has not already finished (doubtful, but maybe)?? You really need some OS/board logs....