> On Jan. 19, 2016, 6:35 p.m., Rajeesh K V wrote: > > I must admit I don't understand the root cause or how m_connection could be > > null, but as this fixes the crash - ship it. > > Andreas Cord-Landwehr wrote: > If I am not mistaken, the root cause is the following: > * XLibTouchpad has a member variable m_touchpadOffAtom > * this variable is created by the default constructor that sets the > connection to 0 > * no m_touchpadOffAtom.intern(...) call is performed to set the > connection, so it remains 0 > The question now for me is, what are the correct parameters for > m_touchpadOffAtom.inter(...). On the one hand it should be m_connection, on > the other hand I do not know what the parameter "name" should name. The > correct position would be IMO > plasma-desktop/kcms/touchpad/src/backends/x11/xlibtouchpad.cpp line 266 to > make this call. > > Rajeesh K V wrote: > Ok, I see the issue now. > The actual backends - libinput and synaptics sets their m_touchpadOffAtom > with respective properties. The new class XlibTouchpad does not initialize > its m_touchpadOffAtom in constructor. I'm not sure with what property it > should be initialized with. Adding Weng Xeutian for more details. > > Xuetian Weng wrote: > If m_display is null, the m_device should be null thus it's not possible > to reach the problematic code. > So I think the only possibility is XGetXCBConnection returns null. Maybe > check m_connection somewhere makes more sense. > > Andreas Cord-Landwehr wrote: > Xuetian, just to check that I understood you right: You propose that > inside XlibTouchpad::setTouchpadOff there should be a check whether m_display > exists and only conditionally, if it exists, there should be a property test? > -- However, currently I do not see how that call could ever work even with > m_display != 0, since the m_touchpadOffAtom is still not initialized with > intern, unlike atoms like m_floatType and m_enabledAtom, which are > initialized in the XlibTouchpad ctor.
Ah, I notice where the bug is. SynapticsTouchpad shouldn't have m_touchpadOffAtom as member. m_touchpadOffAtom should be initialized with ctor of SynapticsTouchpad and LibinputTouchpad. XlibTouchpad is only a abstract class. I have no idea about cause of the original bug though. Can you try the master again and see if it helps? - Xuetian ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126807/#review91343 ----------------------------------------------------------- On Jan. 19, 2016, 9:24 a.m., Andreas Cord-Landwehr wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/126807/ > ----------------------------------------------------------- > > (Updated Jan. 19, 2016, 9:24 a.m.) > > > Review request for Plasma and Alexander Mezin. > > > Bugs: 357907 > https://bugs.kde.org/show_bug.cgi?id=357907 > > > Repository: plasma-desktop > > > Description > ------- > > This is an attempt to fix the crash reported at > https://bugs.kde.org/show_bug.cgi?id=357907. > Yet, I am neither familiar with the code nor with using XCB. So I cannot > judge if this is only a workaround or a proper fix. > > > Diffs > ----- > > kcms/touchpad/src/backends/x11/xcbatom.cpp 06f7f52 > > Diff: https://git.reviewboard.kde.org/r/126807/diff/ > > > Testing > ------- > > Solves the crashes for me. > > > Thanks, > > Andreas Cord-Landwehr > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel