<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Weston aborts during shutdown in multi-head when primary is hot unplugged"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=78415#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Weston aborts during shutdown in multi-head when primary is hot unplugged"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=78415">bug 78415</a>
              from <span class="vcard"><a class="email" href="mailto:neil@linux.intel.com" title="Neil Roberts <neil@linux.intel.com>"> <span class="fn">Neil Roberts</span></a>
</span></b>
        <pre>I was able to reproduce this bug and saw the following output in Valgrind. I
made a patch but I couldn't reproduce the problem 100% of the time so I'm not
totally sure if the patch is right but it seems like a likely candidate.

==14331== Invalid write of size 8
==14331==    at 0x4C1CB47: wl_list_remove (wayland-util.c:55)
==14331==    by 0x40E53F: unbind_resource (compositor.c:3043)
==14331==    by 0x4C16EC0: destroy_resource (wayland-server.c:533)
==14331==    by 0x4C1D319: for_each_helper (wayland-util.c:354)
==14331==    by 0x4C1D355: wl_map_for_each (wayland-util.c:360)
==14331==    by 0x4C171B8: wl_client_destroy (wayland-server.c:671)
==14331==    by 0x93A11AC: shell_destroy (shell.c:5976)
==14331==    by 0x4075CC: wl_signal_emit (wayland-server.h:260)
==14331==    by 0x410E5B: main (compositor.c:4318)
==14331==  Address 0x93248c8 is 40 bytes inside a block of size 1,168 free'd
==14331==    at 0x4A074C4: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==14331==    by 0x5A2B7E6: drm_output_destroy (compositor-drm.c:1156)
==14331==    by 0x5A2E5B0: update_outputs (compositor-drm.c:2325)
==14331==    by 0x5A2E6E8: udev_drm_event (compositor-drm.c:2361)
==14331==    by 0x4C19257: wl_event_source_fd_dispatch (event-loop.c:86)
==14331==    by 0x4C19BFA: wl_event_loop_dispatch (event-loop.c:422)
==14331==    by 0x4C17A4C: wl_display_run (wayland-server.c:959)
==14331==    by 0x410E3A: main (compositor.c:4312)

<a href="http://lists.freedesktop.org/archives/wayland-devel/2014-May/014728.html">http://lists.freedesktop.org/archives/wayland-devel/2014-May/014728.html</a></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>