Summary: | Plasma crashes in AppletsLayout::editModeCondition() | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | wilson_tyler57 |
Component: | Containment | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | 1142978300, darktemplar, dewisant, ikitime, kde, med.medin.2014, nate, plasma-bugs |
Priority: | NOR | Keywords: | drkonqi |
Version: | 5.17.5 | ||
Target Milestone: | 1.0 | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-workspace/8f0da90f18ffa69efdc485f137096f36aedb3909 | Version Fixed In: | 5.18.3 |
Sentry Crash Report: | |||
Attachments: | plasmashell-20200217-110455.kcrash.txt |
Description
wilson_tyler57
2020-02-13 22:33:01 UTC
Any chance you can update to Plasma 5.18 and see if it's fixed now? Plasma 5.17.5 isn't scheduled to get any new bugfixes and 5.18 is an LTS release. Created attachment 126104 [details]
plasmashell-20200217-110455.kcrash.txt
Issue reproduces for me as well. Attached backtrace for plasma-shell 5.17.5, for 5.18.0 it should be similar.
Information about my system:
Qt 5.12.6
Frameworks Version: 5.67.0
Plasma: 5.17.5
I've tried building and running plasma-workspace 5.18.0 only, without upgrading all KDE packages to 5.18.0, it still crashed for me. Reproduces maybe not 100% of time, but pretty often.
How I reproduced this issue:
1) Unlock widgets
2) On desktop push right mouse button and select menu item 'Add Widgets...'
3) Add various widgets to desktop using drag'n'drop on desktop.
I've added at least following widgets on same desktop screen:
Audio Volume, Battery and Brightness, Binary Clock, Clipboard, Color Picker, Grouping Plasmoid, Quick Chat
4) Remove just added widgets in random order
5) If necessary, repeat steps 3 and 4 a few times
If widgets aren't appearing on desktop despite adding them via drag'n'drop, it's bugged and ready to crash. But it's not a requirement for crash.
6) lock widgets
7) plasmashell crashes
After crash and plasmashell restart all recently removed widgets are present on screen again. After removing all widgets again, plasmashell crashes again.
I have only experienced the crash on initial login, multiple times over the last week or so. My desktop is blank and the only thing sitting there is the desktop toolbox and any icons I have on the desktop. The crash initially happened when i started adding widgets back to have some GUI functionality but experienced the crash, i now notice that if i just let it sit long enough, it crashes anyway without any input nor widgets. This is reproducible and happens about ~80% of the time from an initial login after a shutdown (on a laptop). I am currently running Fedora 31, upgraded from 30. plasmashell 5.18.0 is currently unavailable in the fedora 31 update repos so I have not had time to manually update to this version. As the other user stated, they were able to reproduce the issue on that version as well. Anything more that is needed, just ask. I'm not sure when plasma-5.18.0 or later would be available in Linux distro I'm using, but for now I've built plasma-workspace 5.18.1 and plasma-desktop 5.18.1, everything else remaining at version 5.17.5, and issue still reproduces for me. I've tried bisecting plasma-workspace and found nothing, after that I tried bisecting plasma-desktop, and found that first commit when issue appears for me is: https://phabricator.kde.org/D22035 My current guess is that somewhere in QML pointer to object deleted from C++ code remains and is used at some point, leading to crash. I've tried removing following line: https://cgit.kde.org/plasma-workspace.git/tree/components/containmentlayoutmanager/appletslayout.cpp?id=9b75c5c79621cf90eed71ea4472bc28faf7585c3#n664 and adding 'QQmlEngine::setObjectOwnership(container, QQmlEngine::JavaScriptOwnership);' before 'container->setVisible(false);' on line 697. I couldn't reproduce crash after that yet, but it introduced other issues: when I removed widget via menu from right mouse button, the rectangle which contained the widget data remained, and it had to be removed via 'customize layout' menu item from right mouse button menu, and even after that placing new widgets around areas where other widgets were just removed had some weird issues, looking like it was still considered as used screen space. So, it didn't work as solution for me. Also reverting mentioned commit in plasma-desktop fixed issue for me, but I consider it only as hack and workaround and not a proper solution since it also reverts a lot of improvements to widgets made in plasma 5.17.0 and later. I didn't find a proper solution yet, and help with this issue would be welcome. I've updated today to 5.18.1 and it still crashes same way. I've made a change which fixes issue for me: https://phabricator.kde.org/D27650 Could you please check if applying this change to plasma-workspace fixes issue for you too or not? >My current guess is that somewhere in QML pointer to object deleted from C++ code remains and is used at some point, leading to crash.
That would be a very good guess.
If you have a situation like this valgrind is your friend. It'll give you a stack trace of where the item used was first deleted.
(In reply to David Edmundson from comment #6) > >My current guess is that somewhere in QML pointer to object deleted from C++ code remains and is used at some point, leading to crash. > > That would be a very good guess. > > If you have a situation like this valgrind is your friend. It'll give you a > stack trace of where the item used was first deleted. I already did it before creating first version of my patch. No evidence of such issue happening was found. *** Bug 418063 has been marked as a duplicate of this bug. *** Comment 5 mentions a submit request for this ticket; changing status until it is clarified. Git commit 8f0da90f18ffa69efdc485f137096f36aedb3909 by David Edmundson, on behalf of Aleksei Nikiforov. Committed on 06/03/2020 at 11:42. Pushed by davidedmundson into branch 'Plasma/5.18'. ItemContainer: disconnect signals in destructor Summary: Otherwise, setLayout function might be called for already destructed instance of ItemContainer, leading to double reference counter decrement of m_layout QPointer, eventually invalidating such pointers prematurely. Test Plan: 1) Unlock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(false)" 2) On desktop push right mouse button and select menu item 'Add Widgets...' 3) Add various widgets to desktop using drag'n'drop on desktop. I've added at least following widgets on same desktop screen: Audio Volume, Battery and Brightness, Binary Clock, Clipboard, Color Picker, Grouping Plasmoid, Quick Chat 4) Remove just added widgets in random order 5) If necessary, repeat steps 3 and 4 a few times If widgets aren't appearing on desktop despite adding them via drag'n'drop, it's bugged and ready to crash. But it's not a requirement for crash. 6) lock widgets via command: qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(true)" 7) repeat steps 1-6 multiple times 8) plasmashell shouldn't crash Reviewers: ngraham, davidedmundson, mart Reviewed By: davidedmundson Subscribers: cfeck, anthonyfieroni, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D27650 M +2 -0 components/containmentlayoutmanager/itemcontainer.cpp https://commits.kde.org/plasma-workspace/8f0da90f18ffa69efdc485f137096f36aedb3909 *** Bug 418063 has been marked as a duplicate of this bug. *** *** Bug 418245 has been marked as a duplicate of this bug. *** *** Bug 415831 has been marked as a duplicate of this bug. *** *** Bug 415304 has been marked as a duplicate of this bug. *** |