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

"Not yet implemented" exception thrown on Linux running Sun Java

    Details

    • Subcomponent:
      2d
    • CPU:
      generic
    • OS:
      linux, os_x

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_03"
      Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
      Java HotSpot(TM) Client VM (build 1.6.0_03-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Ubuntu Linux 7.10 (Gutsy Gibbon)

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Runtime environment was acquired from Debian package "java-6-sun"

      A DESCRIPTION OF THE PROBLEM :
      I wrote a video game as a project for a Java class I'm taking at college. The game ran fine on the Windows and Macintosh jres, but when I tried to run it on Ubuntu Linux (after installing the Sun jre), during the course of the program, I got the following error:

      Exception in thread "AWT-EventQueue-0" java.lang.InternalError: not implemented yet
              at sun.java2d.x11.X11SurfaceData.getRaster(X11SurfaceData.java:173)
              at sun.java2d.loops.Blit$AnyBlit.Blit(Blit.java:144)
              at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
              at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:54)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:982)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2979)
              at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:740)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:989)
              at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2979)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2964)
              at spaceinvader.AlienImpl.drawOnto(AlienImpl.java:308)
              at spaceinvader.ActionWindow.paint(ActionWindow.java:95)
              at javax.swing.JComponent.paintChildren(JComponent.java:864)
              at javax.swing.JComponent.paint(JComponent.java:1036)
              at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
              at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
              at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
              at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
              at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

      After experimenting, I found that this occurred any time one tried to use a custom implementation of the Composite in a paint() method.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Write a class that implements the java.awt.Composite interface. The implementation can be trivial (i.e., does nothing). Subclass a JComponent, and attempt to use this composite in the paint method. Write an application that displays that component (i.e., in a JFrame). Examples that work on Windows and Macintosh will throw a java.lang.InternalError when that paint method is called. The message says "not implemented yet".

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The paint method should proceed as expected (the details depend on what's actually done there)
      ACTUAL -
      A java.lang.InternalError was thrown which said "not implemented yet", and no painting was done in the method.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Exception in thread "AWT-EventQueue-0" java.lang.InternalError: not implemented yet
              at sun.java2d.x11.X11SurfaceData.getRaster(X11SurfaceData.java:173)
              at sun.java2d.loops.Blit$AnyBlit.Blit(Blit.java:144)
              at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:927)
              at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:550)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:54)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:982)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2979)
              at sun.awt.image.ImageRepresentation.drawToBufImage(ImageRepresentation.java:740)
              at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:989)
              at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:168)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2979)
              at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2964)
              at spaceinvader.AlienImpl.drawOnto(AlienImpl.java:308)
              at spaceinvader.ActionWindow.paint(ActionWindow.java:95)
              at javax.swing.JComponent.paintChildren(JComponent.java:864)
              at javax.swing.JComponent.paint(JComponent.java:1036)
              at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
              at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:285)
              at javax.swing.RepaintManager.paint(RepaintManager.java:1128)
              at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
              at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:723)
              at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:679)
              at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:659)
              at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------

      //paint method paints a small red rectangle using
      //a custom compositing rule, but the rectangle is
      //never drawn, and the method will cause the
      //exception to be thrown.
      public void paint(Graphics g) {
      Graphics2D gfx = (Graphics2D) g;

      //This next line of code sets the compositing rule.
      //If this line is commented out, the program will
      //run normally.
      gfx.setComposite(new MyComposite());

      gfx.setColor(Color.RED);
      gfx.fillRect(4, 4, 10, 10);

      }

      /*
      The above paint method can be used in a subclass of JComponent to demonstrate
      the problem. It assumes that an implementation of java.awt.Component has been
      written. Even a trivial implementation will work (i.e., which does nothing). It should
      draw a red square, but throws an exception instead.
      */
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Run program on different OS.

        Attachments

          Activity

            People

            • Assignee:
              serb Sergey Bylokhov
              Reporter:
              igor Igor Nekrestyanov (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Imported:
                Indexed: