Summary: | Crash in DBus handling after error in XML parsing | ||
---|---|---|---|
Product: | [Plasma] kactivitymanagerd | Reporter: | David Edmundson <kde> |
Component: | general | Assignee: | Méven Car <meven29> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | plasma-bugs |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
David Edmundson
2019-11-08 10:04:33 UTC
I'm reassigning to Meven as he created the Gtk plugin. Git commit 35e5dc950e8fe2dfba46040495e21b17ed580dc1 by David Edmundson. Committed on 10/11/2019 at 17:29. Pushed by davidedmundson into branch 'master'. Remove pointless QDBusServiceWatcher Summary: KActivitymanagerd's ksmserver has a QDBusServiceWatcher in order to recreate a QDBusInterface when the service goes away. There is no need to do this, a call to a given method to a given service will work regardless, dispatching to the correct client is all internal to dbus-daemon. QDBusAbstractInterface has it's own internal QDBusServiceWatcher anyway so we don't get any behavioural differences if we check isValid. This is worth fixing as this class is moved threads and we end up with newly created children in a mess. Test Plan: Reviewers: #plasma, apol Reviewed By: apol Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D25205 M +3 -45 src/service/ksmserver/KSMServer.cpp M +0 -3 src/service/ksmserver/KSMServer_p.h https://commits.kde.org/kactivitymanagerd/35e5dc950e8fe2dfba46040495e21b17ed580dc1 David Did you get a warning such as ? org.kde.kactivities.plugin.gtk-eventspy: could not parse QFileInfo(/home/david/.local/share/recently-used.xbel) error was "error triggered by consumer" My initial hypothesis looking at the traces was that a new ~/.local/share/recently-used.xbel file had been created and the gtk-eventspy plugin tried to read it before it was completely written. But I could not reproduce the crash, instead getting the expected warning mentionned. So I am not sure it is an xml parsing error that causes on its own the crash. And Because of those lines in particular: #5 0x00005631985b67df in Application::~Application (this=0x7ffc76e4d758) at /home/david/projects/kde5/src/kde/workspace/kactivitymanagerd/src/service/Application.cpp:243 #6 0x00007efee1de59b6 in BookmarkHandler::startElement (this=0x7ffc76e4e750, qName=..., attributes=...) at /home/david/projects/kde5/src/kde/workspace/kactivitymanagerd/src/service/plugins/gtk-eventspy/GtkEventSpy.cpp:153 The parsing jumps straight to the destructor, that is triggered from elsewhere I would guess. I don't get : #32 0x00005631985c168c in Activities::~Activities (this=0x56319a1b19e0) at /home/david/projects/kde5/src/kde/workspace/kactivitymanagerd/src/service/Activities.cpp:519 #33 0x00005631985b9d8f in std::default_delete<Activities>::operator() (this=0x7efee2df3d60, __ptr=0x56319a1b19e0) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/bits/unique_ptr.h:81 #34 0x00005631985b9ba0 in std::unique_ptr<Activities, std::default_delete<Activities> >::~unique_ptr (this=0x7efee2df3d60) at /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/9.2.0/../../../../include/c++/9.2.0/bits/unique_ptr.h:284 #35 0x00005631985b9afa in runInQThread<Activities>()::Thread::run() (this=0x56319a1b6d70) at /home/david/projects/kde5/src/kde/workspace/kactivitymanagerd/src/service/Application.cpp:85 Right after runInQThread<Activities> is called and a std::unique_ptr<Activities> is instanciated, std::default_delete<Activities> and ~Activities are called. Aha! The class Application is shadowed inside GtkEventSpy GDB is getting confused on that. It absolutely makes sense for us to be in Application's destructor if we're talking about the struct declared inside GtkEventSpy.cpp rather than Application.h |