Using the KF5 version of Konqueror and selecting Settings - Configure Extensions from the menu crashes with the following assert (irrelevant threads and bottom of stack trimmed): konqueror(15498)/default qt_assert: ASSERT: "config" in file /ws/frameworks/tier3/kcmutils/src/kpluginselector.cpp, line 320 Application: Konqueror (konqueror), signal: Aborted Using host libthread_db library "/lib64/libthread_db.so.1". [Current thread is 1 (Thread 0x7fb2ca917800 (LWP 15498))] Thread 1 (Thread 0x7fb2ca917800 (LWP 15498)): [KCrash Handler] #6 0x00007fb2c2ccc417 in raise () from /lib64/libc.so.6 #7 0x00007fb2c2ccd9dd in abort () from /lib64/libc.so.6 #8 0x00007fb2c4262bae in qt_message_fatal (context=..., message=<synthetic pointer>) at global/qlogging.cpp:1578 #9 QMessageLogger::fatal (this=this@entry=0x7fffb3722e50, msg=msg@entry=0x7fb2c4519e48 "ASSERT: \"%s\" in file %s, line %d") at global/qlogging.cpp:781 #10 0x00007fb2c425c174 in qt_assert (assertion=assertion@entry=0x7fb2c9d55a34 "config", file=file@entry=0x7fb2c9d559b8 "/ws/frameworks/tier3/kcmutils/src/kpluginselector.cpp", line=line@entry=320) at global/qglobal.cpp:2966 #11 0x00007fb2c9d45364 in KPluginSelector::addPlugins (this=0x1fafd20, componentName=..., categoryName=..., categoryKey=..., config=...) at /ws/frameworks/tier3/kcmutils/src/kpluginselector.cpp:320 #12 0x00007fb2ca68351f in KonqExtensionManager::KonqExtensionManager (this=0x7fffb3723010, parent=<optimized out>, mainWindow=<optimized out>, activePart=0x1dd4a20) at /ws/frameworks/applications/kdebaseapps/konqueror/src/konqextensionmanager.cpp:76 #13 0x00007fb2ca66e198 in KonqMainWindow::slotConfigureExtensions (this=<optimized out>) at /ws/frameworks/applications/kdebaseapps/konqueror/src/konqmainwindow.cpp:1821 KonqExtensionManager::KonqExtensionManager() is calling KPluginSelector:;addPlugins() with 3 parameters (in the second and third calls): d->pluginSelector->addPlugins("konqueror", i18n("Extensions"), "Extensions", KSharedConfig::openConfig()); if ( activePart ) { KAboutData componentData = activePart->componentData(); d->pluginSelector->addPlugins(componentData.componentName(), i18n("Extensions"), "Tools"); d->pluginSelector->addPlugins(componentData.componentName(), i18n("Extensions"), "Statusbar"); } According to the KPluginSelector::addPlugins() API documentation (for the 4-parameter form), the default for the last 'config' parameter uses the component name. However, the code seems to have an assert *before* taking the default: void KPluginSelector::addPlugins(const QString &componentName, const QString &categoryName, const QString &categoryKey, KSharedConfig::Ptr config) { [snip...] Q_ASSERT(config); if (!config) { config = KSharedConfig::openConfig(componentName + QStringLiteral("rc")); } so calling this with a null 'config' will always trigger the assert. Reproducible: Always Steps to Reproduce: 1. Run 'konqueror about:blank' 2. Select Settings - Configure Extensions from the menu. Maybe the Q_ASSERT should come after the if (!config) block?
With the patch: --- a/src/kpluginselector.cpp +++ b/src/kpluginselector.cpp @@ -317,10 +317,10 @@ void KPluginSelector::addPlugins(const QString &componentName, return; } - Q_ASSERT(config); if (!config) { config = KSharedConfig::openConfig(componentName + QStringLiteral("rc")); } + Q_ASSERT(config); KConfigGroup cfgGroup(config, "KParts Plugins"); // qDebug() << "cfgGroup = " << &cfgGroup; there is no assert, the list of plugins is shown and the configuration works.
https://git.reviewboard.kde.org/r/126423/
Git commit 1ae59b5f0ea4f50b7350f03fd2b1fe223f66a261 by Jonathan Marten. Committed on 21/12/2015 at 08:52. Pushed by marten into branch 'master'. KPluginSelector::addPlugins: fix assert if 'config' parameter is default REVIEW:126423 M +1 -1 src/kpluginselector.cpp http://commits.kde.org/kcmutils/1ae59b5f0ea4f50b7350f03fd2b1fe223f66a261