Review Request 128227: Don't hold any lock when QML/JS calls qmlplugindump

Denis Steckelmacher steckdenis at
Sat Jun 18 09:46:42 UTC 2016

This is an automatically generated e-mail. To reply, visit:

(Updated June 18, 2016, 9:46 a.m.)


This change has been marked as submitted.

Review request for KDevelop.


Submitted with commit 8389fb2330207b2fa04627d47eb754342f1adc85 by Denis Steckelmacher to branch master.

Bugs: 363509

Repository: kdevelop


The QML/JS language plugin contains a cache that stores information about known plugin paths, locations of imported files and binary QML modules. When the user imports a binary QML module, qmlplugindump is called in order to list its contents.

This patch slightly reworks how a lock is held and released in order to ensure that no lock is held while calling qmlplugindump. In some cases (bug 363509), it seems that qmlplugindump can hang or take a very long time to respond. If Cache is locked during that time, no other thread can parse any QML file. It may also be possible that other threads are blocked while the global DUChain lock is held, which may completely freeze parsing in any language.


  languages/qmljs/duchain/cache.cpp fe63586 



The QML/JS testsuite still runs and passes. I was not able to reproduce the bug, so I encourage anyone having faced the problem to test this patch.


Denis Steckelmacher

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list