Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4204453

Large polygons with negative values hang VM/rasterizer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P4
    • None
    • 1.2.0
    • client-libs
    • 2d
    • x86
    • windows_nt

    Description



      Name: gsC80088 Date: 01/20/99


      If you run this small program that
      simply draws a polygon in JDK1.2RC2 (NT 4), then
      it never returns and the VM is using 100% of the
      CPU.

      This works if you draw directly on the
      standard Graphics or if you use antialiasing.

      You can see this by running this small program:


      import java.awt.*;
      public class bigpolygon extends Panel
      {

        public void paint(Graphics g) {

          Image offscreen = createImage( getBounds().width, getBounds().height);
          g = offscreen.getGraphics();
          int joinx[] = {-50080, -50083, 620053, 620056};
          int joiny[] = {20470, 20462, -24597, -24589};
          g.setColor(Color.blue);
          g.drawPolygon(joinx, joiny, 4);
          
        }

        public static void main(String[] args) {
          Frame f = new Frame();
          f.setLayout(new BorderLayout());
          f.add(new bigpolygon(), BorderLayout.CENTER);
          f.show();
        }

      }
      (Review ID: 43617)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              flar Jim Graham
              gstone Greg Stone
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: