Bug 14280

Summary: Infinite loop when scaling very small values using 24.8
Product: cairo Reporter: Sebastien Pouliot <sebastien>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.5.7   
Hardware: Other   
OS: All   
URL: https://bugzilla.novell.com/show_bug.cgi?id=340809
Whiteboard:
i915 platform: i915 features:
Attachments: Test case

Description Sebastien Pouliot 2008-01-28 10:24:54 UTC
Created attachment 13991 [details]
Test case

When using cairo defining CAIRO_FIXED_FRAC_BITS as 8 in cairo-fixed-private.h I am hitting an infinite loop with the next test case[1] (that works fine using 16bits):

  cairo_t *cr;
  cr = gdk_cairo_create (widget->window);
  cairo_save (cr);
  cairo_scale (cr, 1, 0.0001);
  cairo_translate (cr, 1, 0.0001);
  cairo_move_to (cr, 44.12, 106);
  cairo_curve_to (cr, 43.946765, 93.855989, 38.653008,89.286968,26,90);
  cairo_stroke (cr);
  cairo_restore (cr);
  cairo_destroy (cr);

it loops inside _cairo_pen_stroke_spline_half because the step never increases.
Comment 1 Chris Wilson 2008-09-28 10:27:01 UTC
The test case looks like the degenerate-pen that was fixed in 1.5.2 - but that is earlier than this report. However, the bug is unreproducible now with 1.8.0 which uses 24.8 fixed point.

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.