Summary: | Touchpad KCM crashes on launch | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Ilya Bizyaev <bizyaev> |
Component: | kcm_touchpad | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | bastian.beischer, bugseforuns, buschljo, casey.jensen, darinsmiller, deadindeptford, eric.donkersloot, eridanired123, nate, oberkut, piotr.mierzwinski, unassigned-bugs, yanp.bugz |
Priority: | VHI | ||
Version: | 5.17.5 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/plasma-desktop/b7127724309a136a1a8647341df9f5ad02b22698 | Version Fixed In: | 5.16.2 |
Sentry Crash Report: | |||
Attachments: | New crash information added by DrKonqi |
Description
Ilya Bizyaev
2019-06-05 06:57:42 UTC
Confirmed. :( *** Bug 408627 has been marked as a duplicate of this bug. *** Created attachment 120868 [details]
New crash information added by DrKonqi
systemsettings5 (5.16.0) using Qt 5.12.2
- What I was doing when the application crashed:
i dont' have touchpad and open touchpad setting and get crash
- Unusual behavior I noticed:
- Custom settings of the application:
-- Backtrace (Reduced):
#7 0x00007f389e2ef7c2 in QWidgetItemV2::updateCacheIfNecessary() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8 0x00007f389e2efafd in QWidgetItemV2::maximumSize() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
[...]
#10 0x00007f389e2e4d48 in QBoxLayout::sizeHint() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007f389e2eb8d7 in QLayout::totalSizeHint() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f389e458baa in QScrollArea::sizeHint() const () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
*** Bug 408713 has been marked as a duplicate of this bug. *** *** Bug 408815 has been marked as a duplicate of this bug. *** *** Bug 408794 has been marked as a duplicate of this bug. *** *** Bug 408745 has been marked as a duplicate of this bug. *** *** Bug 407783 has been marked as a duplicate of this bug. *** *** Bug 408844 has been marked as a duplicate of this bug. *** *** Bug 408839 has been marked as a duplicate of this bug. *** I believe this bug is triggered for X11 on systems which do not actually have a touchpad. I think the problem is: Since https://github.com/KDE/plasma-desktop/commit/ce84d6ab4babc80707f4e4c1deb02cfe3ac5b7bb TouchpadConfigContainer::m_plugin is null, because TouchpadBackend::implementation() does not have m_mode properly set. setMode() is supposed to be called in XlibBackend::findTouchpad(), but this goes through the list of touchpads, which can be none, and calls setMode() on each such touchpad. So setMode() is never actually called and m_mode is (implicitly!) initialized to WaylandLibinput (since it does not get set in TouchpadBackend constructor). Then getMode() does not return any of the expected cases in isPlatformX11() branch, which means m_plugin stays a nullptr and then there is a crash in TouchpadConfigContainer::sizeHint(). Proposed fix: --- a/kcms/touchpad/src/kcm/touchpadconfigcontainer.cpp 2019-06-07 18:08:11.000000000 +0200 +++ b/kcms/touchpad/src/kcm/touchpadconfigcontainer.cpp 2019-06-18 14:20:11.853007246 +0200 @@ -42,7 +42,7 @@ if (backend->getMode() == TouchpadInputBackendMode::XLibinput) { m_plugin = new TouchpadConfigLibinput(this, backend); } - else if (backend->getMode() == TouchpadInputBackendMode::XSynaptics) { + else { m_plugin = new TouchpadConfigXlib(this, backend); } } else if (KWindowSystem::isPlatformWayland()) { diff -urN a/kcms/touchpad/src/touchpadbackend.h b/kcms/touchpad/src/touchpadbackend.h --- a/kcms/touchpad/src/touchpadbackend.h 2019-06-07 18:08:11.000000000 +0200 +++ b/kcms/touchpad/src/touchpadbackend.h 2019-06-18 14:18:57.915432036 +0200 @@ -25,9 +25,10 @@ #include <QVariantHash> enum class TouchpadInputBackendMode { - WaylandLibinput = 0, - XLibinput = 1, - XSynaptics = 2 + Unset = 0, + WaylandLibinput = 1, + XLibinput = 2, + XSynaptics = 3 }; class Q_DECL_EXPORT TouchpadBackend : public QObject @@ -35,7 +36,7 @@ Q_OBJECT protected: - explicit TouchpadBackend(QObject *parent) : QObject(parent) {} + explicit TouchpadBackend(QObject *parent) : QObject(parent), m_mode(TouchpadInputBackendMode::Unset) {} void setMode(TouchpadInputBackendMode mode); public: which will create the Synaptics backend as m_plugin in case of no touchpad (as in Plasma 5.15), which will show a message 'No touchpad found' and disable all controls. So is this only an issue in X? I haven't been on my test machine (Surface Pro 2 w/ keyboard and touchpad cover) for a few days, but if all works in Wayland, I'll just make the switch over to a Wayland Session. That way I also get the added onscreen keyboard! :D Thanks to all that are looking into and working on this! Please let me know if you need any additional info/data. Thanks so much for the investigation and the proposed patch, Bastian! Would you mind submitting it using Phabricator? It's dead simple to just copy-and-paste your diff into https://phabricator.kde.org/differential/diff/create/. Please mark @ngraham, @romangg, @atulbi, and #plasma as reviewers. Full documentation is available at https://community.kde.org/Infrastructure/Phabricator Nate, sure. https://phabricator.kde.org/D21884 Thanks very much! I'll see if we can get some eyeballs on that in the next few days. Hi guys, I guess I'm subscribed to the wrong bug report. This is teh behaviour I'm seeing since 5.16: On 5.15.5 (libunput installed, no xf86-input-synaptics installed): 1. Everything works fine, no crashes whatsoever 2. When I connect a bluetooth mouse, the touchpad disables as expected 3. When I disconnect the bluetooth mouse again, the touchpad is re-enabled On 5.16 (libinput installed, no xf86-input-synatics installed): 1. kdeinit5 crashes after logging in 2. When I connect a bluetooth mouse, the touchpad disables as expected 3. When I disconnect the bluetooth mouse again, the touchpad is _not_ re-enabled A workaround for the behaviour above: 1. Manually enable the touchpad again 2. Log out and log in again 3. Install xf86-input-synaptics, this will also prevent kdeinit5 from crashing My system: Lenovo X1 Carbon 6th gen Operating System: Arch Linux KDE Plasma Version: 5.16.0 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.4 Kernel Version: 5.1.11-arch1-1-ARCH OS Type: 64-bit Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz Memory: 15,4 GiB of RAM Should a file another bug? Git commit b7127724309a136a1a8647341df9f5ad02b22698 by Nate Graham, on behalf of Bastian Beischer. Committed on 19/06/2019 at 16:39. Pushed by ngraham into branch 'Plasma/5.16'. [Touchpad KCM] Do not crash in case there is no touchpad Summary: FIXED-IN: 5.16.2 Reviewers: ngraham, romangg, atulbi, #plasma, davidedmundson Reviewed By: ngraham, romangg, #plasma, davidedmundson Subscribers: davidedmundson, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D21884 M +4 -1 kcms/touchpad/src/kcm/touchpadconfigcontainer.cpp M +5 -4 kcms/touchpad/src/touchpadbackend.h https://commits.kde.org/plasma-desktop/b7127724309a136a1a8647341df9f5ad02b22698 Thanks so much, Bastian! Eric, that's a separate issue. Please file a new bug for it. |