Bug 11423

Summary: assert in _cairo_pen_find_active_cw_vertex_index()
Product: cairo Reporter: Christian Kirbach <Christian.Kirbach>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.5.1   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Christian Kirbach 2007-06-29 18:04:01 UTC
bug report opened here
http://bugzilla.gnome.org/show_bug.cgi?id=450465



#2  <signal handler called>
No symbol table info available.
#3  0x00002aaab10e35b5 in raise () from /lib64/libc.so.6
No symbol table info available.
#4  0x00002aaab10e5060 in abort () from /lib64/libc.so.6
No symbol table info available.
#5  0x00002aaab10dc9ff in __assert_fail () from /lib64/libc.so.6
No symbol table info available.
#6  0x00002aaaae9cd73f in _cairo_pen_find_active_cw_vertex_index (
    pen=0x41420880, slope=0x414205d0, active=0x414205fc) at cairo-pen.c:324
        i = 2
        __PRETTY_FUNCTION__ = "_cairo_pen_find_active_cw_vertex_index"
#7  0x00002aaaae9cd7ad in _cairo_pen_stroke_spline_half (pen=0x41420880, 
    spline=<value optimized out>, dir=<value optimized out>, 
    polygon=0x41420650) at cairo-pen.c:392
        i = <value optimized out>
        status = <value optimized out>
        start = 0
        stop = 2
        step = 1
        active = 0
        hull_point = {x = 1, y = 4}
        slope = {dx = 0, dy = 0}
        initial_slope = {dx = -215225, dy = 0}
        point = (cairo_point_t *) 0x414207c0
        num_points = -1
#8  0x00002aaaae9cda10 in _cairo_pen_stroke_spline (pen=0x41420880, 
    spline=0x41420780, tolerance=0.10000000000000001, traps=0x41420ae0)
    at cairo-pen.c:446
        status = CAIRO_STATUS_SUCCESS
        polygon = {status = CAIRO_STATUS_SUCCESS, first_point = {x = 0, 
    y = 18238784}, current_point = {x = 0, y = 7}, has_current_point = 0, 
  num_edges = 0, edges_size = 0, edges = 0x0, edges_embedded = {{edge = {
        p1 = {x = -1324192996, y = 10922}, p2 = {x = 8, y = 0}}, 
      clockWise = 18238616, current_x = 0}, {edge = {p1 = {x = 18238592, 
          y = 0}, p2 = {x = 8, y = 0}}, clockWise = 8, current_x = 0}, {
      edge = {p1 = {x = 18338864, y = 0}, p2 = {x = 0, y = 0}}, 
      clockWise = -1365476967, current_x = 10922}, {edge = {p1 = {
          x = 1094846208, y = 0}, p2 = {x = 1094846192, y = 0}}, 
      clockWise = 18238784, current_x = 0}, {edge = {p1 = {x = 1094846616, 
          y = 0}, p2 = {x = 18338864, y = 0}}, clockWise = 18238592, 
      current_x = 0}, {edge = {p1 = {x = -14190, y = 0}, p2 = {x = 0, 
          y = 0}}, clockWise = 14190, current_x = 0}, {edge = {p1 = {
          x = -1365453317, y = 10922}, p2 = {x = 48, y = 0}}, 
      clockWise = 1094846592, current_x = 0}, {edge = {p1 = {x = 4, y = 0}, 
        p2 = {x = 0, y = 0}}, clockWise = 8, current_x = 0}}}
#9  0x00002aaaae9ccd42 in _cairo_stroker_curve_to (closure=0x41420970, 
    b=<value optimized out>, c=<value optimized out>, d=0x1008678)
    at cairo-path-stroke.c:856
        status = CAIRO_STATUS_SUCCESS
        stroker = <value optimized out>
        spline = {a = {x = 1369458, y = 3870824}, b = {x = 1154233, 
    y = 3870824}, c = {x = 940662, y = 3870824}, d = {x = 724559, 
    y = 3870824}, initial_slope = {dx = -215225, dy = 0}, final_slope = {
    dx = -216103, dy = 0}, num_points = 2, points_size = 8, 
  points = 0x414207c0, points_embedded = {{x = 1369458, y = 3870824}, {
      x = 724559, y = 3870824}, {x = 0, y = 0}, {x = 1285458442, 
      y = 1017805113}, {x = 0, y = 0}, {x = -1329405451, y = 10922}, {x = 0, 
      y = 0}, {x = -3, y = 1127743487}}}
        pen = {radius = 0.625, tolerance = 0.10000000000000001, 
  vertices = 0x117d430, num_vertices = 2}
        start = {ccw = {x = 1369458, y = 3870824}, point = {x = 1369458, 
    y = 3870824}, cw = {x = 1369458, y = 3870824}, dev_vector = {
    dx = -215225, dy = 0}, usr_vector = {x = 1, y = 0}}
        end = {ccw = {x = 724559, y = 3870824}, point = {x = 724559, 
    y = 3870824}, cw = {x = 724559, y = 3870824}, dev_vector = {dx = -216103, 
    dy = 0}, usr_vector = {x = 1, y = 0}}
        extra_points = {{x = 0, y = 0}, {x = 0, y = 0}, {x = 0, y = 0}, {
    x = 0, y = 0}}
        a = <value optimized out>
#10 0x00002aaaae9cb096 in _cairo_path_fixed_interpret (
    path=<value optimized out>, dir=<value optimized out>, 
    move_to=0x2aaaae9cc240 <_cairo_stroker_move_to>, 
    line_to=0x2aaaae9cd210 <_cairo_stroker_line_to>, 
    curve_to=0x2aaaae9cca70 <_cairo_stroker_curve_to>, 
    close_path=0x2aaaae9cd3a0 <_cairo_stroker_close_path>, closure=0x41420970)
    at cairo-path-fixed.c:483
        points = (cairo_point_t *) 0x1008668
        start = <value optimized out>
        stop = 3
        i = 1
        status = <value optimized out>
        buf = (cairo_path_buf_t *) 0x1008618
        op = <value optimized out>
        forward = 1
        step = 1
#11 0x00002aaaae9cc599 in _cairo_path_fixed_stroke_to_traps (path=0x10085f8, 
    stroke_style=0x0, ctm=0x117cb38, ctm_inverse=0x117cb68, 
    tolerance=0.10000000000000001, traps=0x41420ae0)
    at cairo-path-stroke.c:1013
        status = CAIRO_STATUS_SUCCESS
        stroker = {style = 0x117ca58, ctm = 0x117cb38, 
  ctm_inverse = 0x117cb68, tolerance = 0.10000000000000001, 
  traps = 0x41420ae0, pen = {radius = 0.625, tolerance = 0.10000000000000001, 
    vertices = 0x117d3c0, num_vertices = 4}, current_point = {x = 1369458, 
    y = 3870824}, first_point = {x = 1369458, y = 3870824}, 
  has_initial_sub_path = 0, has_current_face = 1, current_face = {ccw = {
      x = 724559, y = 3870824}, point = {x = 724559, y = 3870824}, cw = {
      x = 724559, y = 3870824}, dev_vector = {dx = -216103, dy = 0}, 
    usr_vector = {x = 1, y = 0}}, has_first_face = 1, first_face = {ccw = {
      x = 1369458, y = 3870824}, point = {x = 1369458, y = 3870824}, cw = {
      x = 1369458, y = 3870824}, dev_vector = {dx = -215225, dy = 0}, 
    usr_vector = {x = 1, y = 0}}, dashed = 0, dash_index = 0, 
  dash_on = 18020080, dash_starts_on = 0, 
  dash_remain = 2.1219957909652723e-313}
#12 0x00002aaaae9c65d3 in _cairo_gstate_stroke_extents (gstate=0x117ca40, 
    path=0x10085f8, x1=0x41420c00, y1=0x41420c08, x2=0x41420c10, 
    y2=0x41420c18) at cairo-gstate.c:1136
        status = <value optimized out>
        traps = {status = CAIRO_STATUS_SUCCESS, extents = {p1 = {
      x = 2147483647, y = 2147483647}, p2 = {x = -2147483648, 
      y = -2147483648}}, num_traps = 0, traps_size = 0, traps = 0x0, 
  traps_embedded = {{top = -1365508740, bottom = 10922, left = {p1 = {
          x = 3870824, y = 0}, p2 = {x = 612630926, y = 1078822964}}, 
      right = {p1 = {x = -399442612, y = 1075445975}, p2 = {x = 612630061, 
          y = 1078822964}}}}}
#13 0x00002aaaae9bf5dc in cairo_stroke_extents (cr=0x1008430, x1=0x8, 
    y1=0xffffffffffffffff, x2=0x0, y2=0x747265765f6d756e) at cairo.c:2241
        status = <value optimized out>
Comment 1 Behdad Esfahbod 2007-07-01 16:53:38 UTC
The GNOME bug says it's cairo 1.4.4.  We already fixed this:

commit 133183d858aa632da3cec2a789dcc1e1203d778b
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Mar 15 22:08:55 2007 -0700

    Fix cairo_stroke_extents and cairo_in_stroke to not crash with line width of 0.0
    
    This fixes the line-width-zero test case and the bug reported here:
    
        Crash in cairo_stroke_extents whe line width is 0 and line cap is ROUND
        (_cairo_pen_find_active_cw_vertex_index)
        https://bugs.freedesktop.org/show_bug.cgi?id=10231

 src/cairo-gstate.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

commit 23caa0f43ba199371ab178cf3e827e449ee5935f
Author: Carl Worth <cworth@cworth.org>
Date:   Thu Mar 15 21:58:20 2007 -0700

    Add line-width-zero test which currently crashes.
    
    The crash is described in this bug report:
    
        Crash in cairo_stroke_extents whe line width is 0 and line cap is ROUND
        (_cairo_pen_find_active_cw_vertex_index)
        https://bugs.freedesktop.org/show_bug.cgi?id=10231

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.