<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 - cairo snapshot 1.15.[2,4], win32 backend: assertion (surface->is_clear) failed"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99054">99054</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cairo snapshot 1.15.[2,4], win32 backend: assertion (surface->is_clear) failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>cairo
          </td>
        </tr>

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

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

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

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

        <tr>
          <th>Severity</th>
          <td>critical
          </td>
        </tr>

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

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

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

        <tr>
          <th>Reporter</th>
          <td>wippbox@gmx.net
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>cairo-bugs@cairographics.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=128411" name="attach_128411" title="Fix">attachment 128411</a> <a href="attachment.cgi?id=128411&action=edit" title="Fix">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=99054&attachment=128411'>[review]</a>
Fix

I cross-compiled cairo-1.15.2 and cairo-1.15.4 for windows.
When running a test program, I get the following:

<span class="quote">>   Assertion failed!

>   File: src/cairo-surface.c, Line 545

>   Expression: surface->is_clear

>   abnormal program termination</span >

This happens in cairo_surface_create_similar.
Adding a line
<span class="quote">> new_surf->is_clear = TRUE;</span >
at the end of _cairo_win32_display_surface_create_similar in
src/win32/cairo-win32-display-surface.c
fixes the issue (see patch).

Remark: The particular case occured only for width = 0 in
cairo_surface_create_similar. For width > 0 the issue did not happen.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>