<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - device-offset test randomly fails because XCreatePixmap bits are undefined"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=83822">83822</a>
          </td>
        </tr>

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

        <tr>
          <th>Summary</th>
          <td>device-offset test randomly fails because XCreatePixmap bits are undefined
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr>

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

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>sixtysix@inwind.it
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>xlib backend
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=106221" name="attach_106221" title="proposed patch">attachment 106221</a> <a href="attachment.cgi?id=106221&action=edit" title="proposed patch">[details]</a></span>
proposed patch

while running

DISPLAY=:2 make test TARGETS=image,xlib

with Xvfb on display :2, to check a fix for <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Segmentation fault when using a complex path for clip and stroke"
   href="show_bug.cgi?id=74779">bug #74779</a>, occasionally
device-offset.xlib-render-0_0.rgb24 was reported PASS, even if the code
modified was not executed at all by that test.

The problem is that in that test (and few others) a temporary Pixmap is
created on the server and because render-0_0 does not have FillRectangles
an image surface is used to clear the Pixmap, but because the image surface
is already 'clear' it is left untouched and in _cairo_surface_unmap the 'clear'
image is not unmapped because untouched (image->base.serial == 0)

<a href="http://cgit.freedesktop.org/cairo/tree/src/cairo-surface.c#n688">http://cgit.freedesktop.org/cairo/tree/src/cairo-surface.c#n688</a>

this means X's Pixmap is left in its original undefined state and only
occasionally it is clear.

I suggest to increment the serial member of the image_surface when the
'is_clear' state of the image_surface does not correspond to a clear
content of the corresponding xlib_surface, as in the attached patch.</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>