Summary: | Lots of plasmashell: invalid metadata warnings | ||
---|---|---|---|
Product: | [Frameworks and Libraries] libplasma | Reporter: | Wolfgang Bauer <wbauer1> |
Component: | libplasma | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | nate |
Priority: | NOR | ||
Version: | 5.61.0 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-framework/b76b908e1056a38170725c939c7865e748f0db6a | Version Fixed In: | 5.68 |
Sentry Crash Report: |
Description
Wolfgang Bauer
2019-09-30 08:24:17 UTC
I did some more investigation... The new code in plasma-framework does KPluginMetaData metadata(pluginPath); And pluginPath is the path to the plugin's .so file. These plugins have their metadata in a .desktop file though, not in the .so file. Corresponding code in kcoreaddons: KPluginMetaData::KPluginMetaData(const QString &file) { if (file.endsWith(QLatin1String(".desktop"))) { loadFromDesktopFile(file, QStringList()); } else if (file.endsWith(QLatin1String(".json"))) { d = new KPluginMetaDataPrivate; QFile f(file); bool b = f.open(QIODevice::ReadOnly); if (!b) { qCWarning(KCOREADDONS_DEBUG) << "Couldn't open" << file; return; } QJsonParseError error; m_metaData = QJsonDocument::fromJson(f.readAll(), &error).object(); if (error.error) { qCWarning(KCOREADDONS_DEBUG) << "error parsing" << file << error.errorString(); } m_fileName = file; d->metaDataFileName = file; } else { QPluginLoader loader(file); m_fileName = QFileInfo(loader.fileName()).absoluteFilePath(); m_metaData = loader.metaData().value(QStringLiteral("MetaData")).toObject(); } } I.e. it uses QPluginLoader here to get the metadata from the .so file, which is empty (because the metadata is actually in the .desktop file only). So I think the new caching code should just ignore plugins with empty/invalid metadata (as it does), and not print a warning about it either. This annoys me too and I agree with your reasoning. Trivial patch: https://phabricator.kde.org/D27080 Git commit b76b908e1056a38170725c939c7865e748f0db6a by Nate Graham. Committed on 07/02/2020 at 13:34. Pushed by ngraham into branch 'master'. Don't warn for invalid plugin metata Summary: See explanation in https://bugs.kde.org/show_bug.cgi?id=412464 FIXED-IN: 5.67 Test Plan: restart plasmashell, see way less useless warning spam Reviewers: #plasma, mart, apol Reviewed By: apol Subscribers: apol, alex, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D27080 M +1 -1 src/plasma/pluginloader.cpp https://commits.kde.org/plasma-framework/b76b908e1056a38170725c939c7865e748f0db6a |