Summary: | Clearing Recent Documents Causes Plasma Crash | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Joe <jchevarley> |
Component: | Application Menu (Kicker) widget | Assignee: | Eike Hein <hein> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | arojas, ivan.cukic, kde, kde, plasma-bugs-null |
Priority: | NOR | ||
Version First Reported In: | 5.4.95 | ||
Target Milestone: | 1.0 | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/plasma-desktop/d6083260831ab21591dea751cb41f0390ccbf251 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | And the attachment... |
Description
Joe
2015-11-21 05:24:08 UTC
Ivan, this is the crash I told you about. [16:40] <Sho_> ivan|home, on master: [16:40] <Sho_> ah fuck [16:40] <Sho_> sec [16:41] <Sho_> #6 0x00007f11c64f3f91 in KActivities::Experimental::Stats::Query::activities (this=0x38) at /home/sho/devel/src/kde/workspace/plasma-desktop/lib/kactivities-stats/src/lib/stats/query.cpp:140 [16:41] <Sho_> #7 0x00007f11c6511dc7 in KActivities::Experimental::Stats::forgetResources (query=...) at /home/sho/devel/src/kde/workspace/plasma-desktop/lib/kactivities-stats/src/lib/stats/cleaning.cpp:47 [16:41] <Sho_> #8 0x00007f11c650628a in KActivities::Experimental::Stats::ResultModel::forgetAllResources (this=0x405f420) at /home/sho/devel/src/kde/workspace/plasma-desktop/lib/kactivities-stats/src/lib/stats/resultmodel.cpp:794 [16:41] <Sho_> ivan|home: reproducable crash on forgetall on master ^ See also https://bugs.kde.org/show_bug.cgi?id=355722 it's subtly different forgetResource not forgetResource*s* I'm getting this backtrace when I clear history: #6 0x00007f14cc5f0b7a in QListData::size() const () from /usr/lib/x86_64-linux-gnu/libKF5ActivitiesExperimentalStats.so.1 #7 0x00007f14cc608298 in QList<KActivities::Experimental::Stats::ResultSet::Result>::size() const () from /usr/lib/x86_64-linux-gnu/libKF5ActivitiesExperimentalStats.so.1 #8 0x00007f14cc603f34 in KActivities::Experimental::Stats::ResultModelPrivate::Cache::size() const () from /usr/lib/x86_64-linux-gnu/libKF5ActivitiesExperimentalStats.so.1 #9 0x00007f14cc6031f0 in KActivities::Experimental::Stats::ResultModel::forgetResource(int) () from /usr/lib/x86_64-linux-gnu/libKF5ActivitiesExperimentalStats.so.1 #10 0x00007f14cc8c889a in RecentUsageModel::trigger(int, QString const&, QVariant const&) () from /usr/lib/x86_64-linux-gnu/qt5/qml/org/kde/plasma/private/kicker/libkickerplugin.so I finally reproduced this, though in Kickoff, not in Kicker. Is this happening for Kicker as well? If the main problem is Kickoff, like it is for me, the issue might be that the model sometimes thinks sourceModel is KAStats::ResultModel and sometimes GroupSortProxy: recentusagemodel.cpp: static_cast<GroupSortProxy *>(sourceModel()); recentusagemodel.cpp: static_cast<ResultModel *>(sourceModel()); The patch in the attachment fixes the crash I have in Kickoff. Created attachment 95778 [details]
And the attachment...
Looks like a likely cuase. Can you replace the static casts with qobject casts. Had the original code used them we would have narrowed this bug down immediately. I don't want to step on Eike's toes - the cleanest solution would be probably to keep a non-null ResultModel* member in the model (and GroupSortProxy* which could be null) so that no casts are required, but I didn't want to taint the .h file.
> Had the original code used them we would have narrowed this bug down immediately.
The problem is that at the same time a similar crash in KActivities KCM appeared. Though, that seems to have been clang-format changing my dbus paths :)
*** Bug 355276 has been marked as a duplicate of this bug. *** *** Bug 355722 has been marked as a duplicate of this bug. *** Ivan, feel free to commit this to the 5.5 branch and thanks for working it up. I'm happy with the static_cast variant for this myself, but I don't object to the other proposals either if they make folks feel better (I prefer to avoid member clutter though). Git commit 3c1c89866f0301698097e48c7da3cf6b2978acbd by Ivan Čukić. Committed on 01/12/2015 at 15:01. Pushed by ivan into branch 'master'. Kickoff thought that its source model is KAStats::ResultModel. It was mistaken. M +17 -4 applets/kicker/plugin/recentusagemodel.cpp M +2 -0 applets/kicker/plugin/recentusagemodel.h http://commits.kde.org/plasma-desktop/3c1c89866f0301698097e48c7da3cf6b2978acbd Git commit d6083260831ab21591dea751cb41f0390ccbf251 by Ivan Čukić. Committed on 01/12/2015 at 15:02. Pushed by ivan into branch 'Plasma/5.5'. Kickoff thought that its source model is KAStats::ResultModel. It was mistaken. M +17 -4 applets/kicker/plugin/recentusagemodel.cpp M +2 -0 applets/kicker/plugin/recentusagemodel.h http://commits.kde.org/plasma-desktop/d6083260831ab21591dea751cb41f0390ccbf251 |