<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/126807/">https://git.reviewboard.kde.org/r/126807/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On January 19th, 2016, 6:35 p.m. UTC, <b>Rajeesh K V</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
 </blockquote>




 <p>On January 19th, 2016, 6:43 p.m. UTC, <b>Andreas Cord-Landwehr</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If I am not mistaken, the root cause is the following:
<em style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: normal;"> XLibTouchpad has a member variable m_touchpadOffAtom
</em> 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.</p></pre>
 </blockquote>





 <p>On January 19th, 2016, 7:09 p.m. UTC, <b>Rajeesh K V</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
 </blockquote>





 <p>On January 20th, 2016, 4:20 a.m. UTC, <b>Xuetian Weng</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
 </blockquote>





 <p>On January 20th, 2016, 8:16 a.m. UTC, <b>Andreas Cord-Landwehr</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Ah, I notice where the bug is. SynapticsTouchpad shouldn't have m_touchpadOffAtom as member.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">m_touchpadOffAtom should be initialized with ctor of SynapticsTouchpad and LibinputTouchpad. XlibTouchpad is only a abstract class.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I have no idea about cause of the original bug though.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Can you try the master again and see if it helps?</p></pre>
<br />










<p>- Xuetian</p>


<br />
<p>On January 19th, 2016, 9:24 a.m. UTC, Andreas Cord-Landwehr wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Plasma and Alexander Mezin.</div>
<div>By Andreas Cord-Landwehr.</div>


<p style="color: grey;"><i>Updated Jan. 19, 2016, 9:24 a.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=357907">357907</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
plasma-desktop
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Solves the crashes for me.</p></pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kcms/touchpad/src/backends/x11/xcbatom.cpp <span style="color: grey">(06f7f52)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/126807/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>