<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 --- - "double free or corruption" error appeares while i try to draw dotted line"
href="https://bugs.freedesktop.org/show_bug.cgi?id=75705">75705</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>chris@chris-wilson.co.uk
</td>
</tr>
<tr>
<th>Summary</th>
<td>"double free or corruption" error appeares while i try to draw dotted line
</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>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>pserg.sema@gmail.com
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>1.12.16
</td>
</tr>
<tr>
<th>Component</th>
<td>general
</td>
</tr>
<tr>
<th>Product</th>
<td>cairo
</td>
</tr></table>
<p>
<div>
<pre>/*
"double free or corruption" error appeares while i try to draw dotted line
in case I comment line:
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
or change antialias type to CAIRO_ANTIALIAS_BEST
- all work properly
*/
#include<cstdio>
#include<cairo/cairo.h>
int main()
{
cairo_surface_t *surface;
cairo_t *cr;
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 256, 256);
cr = cairo_create(surface);
cairo_set_source_rgba(cr, 0, 0, 0, 1);
cairo_paint(cr);
cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
cairo_set_line_join(cr, CAIRO_LINE_JOIN_ROUND);
cairo_new_path(cr);
cairo_move_to(cr, 100, 251);
cairo_line_to(cr, 100, 196);
cairo_move_to(cr, 36, 3);
cairo_line_to(cr, 107, 3);
cairo_set_antialias(cr, CAIRO_ANTIALIAS_FAST);
cairo_set_tolerance(cr, 1);
double dsh[2] = {1,3};
cairo_set_dash(cr, dsh, 2, 0);
cairo_set_source_rgba(cr, 1, 1, 1, 1);
cairo_set_line_width(cr, 2);
cairo_stroke(cr);
cairo_destroy (cr);
cairo_surface_write_to_png (surface, "hello.png");
cairo_surface_destroy (surface);
return 0;
}</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>