Bug 25400 - Area.subtract() hangs
Summary: Area.subtract() hangs
Status: ASSIGNED
Alias: None
Product: classpath
Classification: Unclassified
Component: awt (show other bugs)
Version: 0.19
: P3 normal
Target Milestone: ---
Assignee: Francis Kung
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-13 22:20 UTC by david.gilbert
Modified: 2013-02-06 16:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-12-14 21:50:41


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description david.gilbert 2005-12-13 22:20:17 UTC
Attached is a small test program that doesn't run to completion (i.e. hangs) on JamVM 1.4.1 with a recent CVS version of Classpath.  I came across this bug while testing a demo program included with iText (1.3.6).

import java.awt.geom.Area;
import java.awt.geom.Ellipse2D;

public class Test {
    
    public static void main(String[] args) {
        Ellipse2D ellipse1 = new Ellipse2D.Double(75.0, 33.0, 40.0, 40.0);
        Ellipse2D ellipse2 = new Ellipse2D.Double(78.0, 28.0, 50.0, 50.0);
        Area a1 = new Area(ellipse1);
        Area a2 = new Area(ellipse2);
        a1.subtract(a2);
        System.out.println(a1);
    }

}
Comment 1 Sven de Marothy 2005-12-14 21:50:40 UTC
Yup. Confirmed. I knew about this behaviour already though :-/ 
(Although to my defense, the JDK can hang on some Area operations too.)

But having a simple testcase should be a good help in fixing this, so thanks.

The goals I think we should have for Area is to never hang, and produce erroneous output less often than the JDK.
Comment 2 david.gilbert 2005-12-14 21:57:13 UTC
Great!  The original source for the bug is:

http://itextdocs.lowagie.com/examples/com/lowagie/examples/directcontent/graphics2D/G2D.java

I was just running some of the example programs to see how well iText runs on GNU Classpath.  Most of the ones I've tried "just work" which is good news.  Except for the one I linked above, of course.