<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:stu_dby@126.com" title="Boyan Ding <stu_dby@126.com>"> <span class="fn">Boyan Ding</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Weston crash when weston-desktop-shell and weston-keyboard missing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82957">bug 82957</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>stu_dby@126.com
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Weston crash when weston-desktop-shell and weston-keyboard missing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82957#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Weston crash when weston-desktop-shell and weston-keyboard missing"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=82957">bug 82957</a>
              from <span class="vcard"><a class="email" href="mailto:stu_dby@126.com" title="Boyan Ding <stu_dby@126.com>"> <span class="fn">Boyan Ding</span></a>
</span></b>
        <pre>Well, the problem here is a quite tricky race condition.

If weston-desktop-shell isn't found (or dies), desktop-shell will do two things
concurrently -- emitting the client's destroy signal and try to launch shell
client again. If the destroy signal is emitted first, everything is okay. If a
new shell client is launched first (calling launch_desktop_shell_process),
things will go wrong because the shell->child.client_destroy_listener is
registered the second time, breaking the listening list of the dead client's
destroy signal. When destroy signal is finally emitted, iteration on the broken
list will cause illegal invocation and the program will crash.

I guess the missing of two programs only increases the chance of race and
sometimes weston won't crash in my observation.

I'll come up with a patch soon.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>