Opened 10 years ago
Last modified 10 years ago
#44358 new defect
cairo crash on simple testcase — at Initial Version
Reported by: | ethan@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.3.1 |
Keywords: | Cc: | ||
Port: | cairo |
Description
The cairo 1.12.16_2 port is generally working for me, but consistently crashing when run with the following code:
#include <cairo.h>
int main() {
cairo_surface_t *surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 800, 600); cairo_t *cr = cairo_create(surface);
cairo_move_to(cr, 200, 300); cairo_curve_to(cr, 200.000000, 189.543050, 289.543050, 100.000000, 400.000000, 100.000000); cairo_curve_to(cr, 510.456950, 100.000000, 600.000000, 189.543050, 600.000000, 300.000000); cairo_curve_to(cr, 600.000000, 410.456950, 510.456950, 500.000000, 400.000000, 500.000000); cairo_curve_to(cr, 289.543050, 500.000000, 200.000000, 410.456950, 200.000000, 300.000000); cairo_clip(cr);
cairo_move_to(cr, 352.287126, 66.212743); cairo_line_to(cr, 364.004851, 68.800196); cairo_line_to(cr, 359.045565, 91.259170); cairo_line_to(cr, 347.327840, 88.671716); cairo_line_to(cr, 352.287126, 66.212743); cairo_stroke(cr);
cairo_destroy(cr); cairo_surface_destroy(surface); return 0;
}
The crash occurs in cairo_clip_intersect_rectangle_box. The exact same program is working fine under Linux and also works fine on my Mac if I manually build the latest Cairo code from git rather than use the MacPorts version.