backgroundparser: Ensure jobs are finished on exit
ClosedPublic

Authored by kfunk on Aug 4 2017, 12:15 PM.

Details

Summary

Make sure all parse jobs are done *before* potentially starting to unload language plugins.
I think this fixes one cause of bug 379669.

With this patch I also fix an assert which I added earlier today; which
triggers when exiting KDevelop:

Log excerpt:

kdevelop(21550)/kdevplatform.shell:
KDevelop::PluginController::unloadPlugin(442): unloading plugin:
ManPagePlugin(0x606001ae16c0) "Man Pages"
kdevelop(21550)/kdevplatform.documentation:
DocumentationView::showDocumentation(187): showing "CMake Content Page"
kdevelop(21550)/kdevplatform.language:
KDevelop::TypeSystem::ensureFactoryLoaded(64): Factory for this type not
loaded: 18
kdevelop(21550)/default: unknown(0): ASSERT: "false" in file
/home/kfunk/devel/src/kf5/kdevplatform-stable/language/duchain/types/typeregister.cpp,
line 65

CCBUG: 379669

Diff Detail

Repository
R33 KDevPlatform
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kfunk created this revision.Aug 4 2017, 12:15 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptAug 4 2017, 12:15 PM
brauch added a subscriber: brauch.Aug 4 2017, 5:37 PM

Looks sensible, but do we not do something similar in the language plugins already ...? I thought I remember some patch of yours adding something related a while ago ...

language/backgroundparser/backgroundparser.cpp
816

why this bool return type?

This revision was automatically updated to reflect the committed changes.