Qt application severe hangs on process->start()
-
@jeremy_k said in Qt application severe hangs on process->start():
...for some definition of bad.
Hi Jeremy. Now that this issue is resolved for the OP. It was bothering me so I went back to check the behaviour of destructing a
QProcess
while a long-runningstart(...)
process is still running, It is indeed true that destructor "kills" it, but per my vague recollection writes to the Application Output pane warning messageQProcess: Destroyed while process ("find") is still running.
. Which people have asked about in the past. So clearly Qt code thinks this is "bad", and expects you to e.g.terminate()
it yourself before letting instance run out of scope. Just saying (for anyone reading this). -
Very, very feeling to all who answered my question. Although my problem was solved using another method, I'm still trying to figure out the root cause of the problem, so if anyone has encountered the same problem and figured out what the problem is, I'd appreciate it if you could let me know.
-
Yup, there is a qWarning(). Its presence predates the modularization project, and the oldest repo clone I have at the moment. As such, I can't tell if the warning and the behavior in question were from the same author. There are other qWarnings() that don't appear to indicate a problematic condition.
Compare this to the documentation for QThread::~QThread() prior to 6.3, which clearly indicates a "bad" situation.
Note that deleting a QThread object will not stop the execution of the thread it manages. Deleting a running QThread (i.e. isFinished() returns false) will result in a program crash.
Qt developers, or "the trolls", aren't a hive mind. The people who work on it have differing, and changing, and sometimes outright conflicting opinions. Sometimes they make mistakes.