<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - mpv hits BadDrawable on vaapi/opengl interop teardown"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=85665">85665</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>mpv hits BadDrawable on vaapi/opengl interop teardown
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>URL</th>
          <td>https://github.com/mpv-player/mpv/issues/1211
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>bisected
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>kevmitch@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have bisected the appearence of this bug down to
    xf86-video-intel:d8eb87f84f88ad2df42c6fed1d93df76589a14e3
    Author: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
    Date:   Thu May 8 16:25:32 2014 +0100

        sna: Add support for DRI3

        Signed-off-by: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>


Hardware: Mesa DRI Intel(R) Ivybridge Mobile

After this commit, running mpv-player from git master (though all tested
versions show the same symptom) with the following command

    mpv/build/mpv --no-config --hwdec=vaapi --vo=opengl --msg-level=all=trace
<h264file>

will result in the following output right before the player exits (either
because of regular end of file or the user quitting the program with "q").

    .
    .
    .
    Exiting... (Quit)
    [osc] Exiting...
    [ao/alsa] draining...
    [ao/alsa] uninit: pcm closed
    [input] release all
    [vo/opengl/x11] Enabling screensaver.
    [vo/opengl/x11] X11 error: BadDrawable (invalid Pixmap or Window parameter)
    [vo/opengl/x11] Type: 0, display: 0x7f1a9825d0f0, resourceid: 4a0000d,
serial: 141
    [vo/opengl/x11] Error code: 9, request code: 9a, minor code: 4
    [vo/opengl/x11] uninit ...

No other ill effects are observed by the user. I tried narrowing down the error
within the mpv code, but it appears to be happening on essentially
random/unrelated X calls (i.e., xss_suspend, or XDefineCursor depending on
whehter the --no-stop-screensaver is added) likely because the x connection is
asyncronous.

This behaviour is only observed with the above combination of vaapi hardware
decoding with opengl interop output (i.e, none of "--hwdec=vaapi --vo=vaapi",
"--hwdec=vaapi-copy --vo=opengl", or "--hwdec=no --vo=opengl" exhibit this
problem).

I have linked the mpv bug report in the URL for this bug.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>