Review Request: Workaround for the hang (freeze) when opening VLC's file dialog under KDE...

Oswald Buddenhagen ossi at kde.org
Fri Feb 4 23:38:44 GMT 2011


On Fri, Feb 04, 2011 at 04:35:32PM -0500, Dawit Alemayehu wrote:
> The case of the kill is even more baffling to me because its
> documentation clearly says "Kills the current process, causing it to
> exit immediately". So If I kill is invoked as such
> 
> process.kill();
> 
> what should a reasonable expectation be ? To me the process gets
> killed immediately. Done, poof, gone.
> 
yes, except it is stuck in D state. happy waiting then.

but even if the kill is successful, the doc doesn't mention anything
about the state of the qprocess object - it refers exclusively to the
process itself. you just interpolated too much into it.

On Fri, Feb 04, 2011 at 05:35:00PM -0500, Dawit Alemayehu wrote:
> 1113	QProcess::~QProcess()
> 1114	{
> 1118	        kill();
> 1119	        waitForFinished();
> 
> Please note that were it not for VLC blocking of the SIGCHLD signal, I
> doubt I would have noticed this issue because the condition under
> which waitForFinished is called in QProcess' dtor above would probably
> never be met ??
>
the condition is very often met - each time you delete a running
qprocess. under normal conditions that waitForFinished() will almost
immediately return. you get a double hang because qprocess is already in
an internally inconsistent state, which i wouldn't call a bug in the
above code. you would also get a hang in the D state case, but, uhm,
it's hung - not exactly a normal state, either.




More information about the kde-core-devel mailing list