harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Pavlenko (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4633) [classlib][awt] Infinite FlatteningPathIterator
Date Wed, 15 Aug 2007 05:37:30 GMT
[classlib][awt] Infinite FlatteningPathIterator
-----------------------------------------------

                 Key: HARMONY-4633
                 URL: https://issues.apache.org/jira/browse/HARMONY-4633
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: SuSE Linux 10.0 32-bit
            Reporter: Andrey Pavlenko


The following test intermittently hangs on Linux.  This is caused by FlatteningPathIterator
which becomes infinite after window resising and after that the loop in the method org.apache.harmony.awt.gl.render.JavaShapeRasterizer.makeBuffer(PathIterator,
double) never ends. 

import java.awt.BasicStroke;
import java.awt.Canvas;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Graphics2D;

public class Test {
    public static void main(String[] args) {
        final Frame f = new Frame();

        f.add(new Canvas() {
            @Override
            public void paint(Graphics g) {
                final Graphics2D g2 = (Graphics2D) g;
                final int w = getSize().width;
                final int h = getSize().height;
                final BasicStroke s = new BasicStroke(3, BasicStroke.CAP_ROUND,
                        BasicStroke.JOIN_ROUND, 0, new float[] { 0, 6, 0, 6 },
                        0);

                System.out.println(1);
                g2.setStroke(s);
                System.out.println(2);
                g2.drawRect(3, 3, w - 6, h - 6);
                System.out.println(3);
            }
        });

        f.setSize(100, 100);
        f.setVisible(true);
        f.pack();
        f.setSize(110, 110);
        f.setSize(120, 120);
        f.setSize(130, 130);
    }
}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message