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

D3D: intermittent NPE when ALT+Tabing a FS frame rendering a volatile image, WinVista

    XMLWordPrintable

Details

    • 2d
    • x86
    • windows_vista

    Description

      I am running a FullScreen application which screen-captures the desktop and renders it within a volatile image. The volatile image is actually scaled and rotated continuously driven by a timer and the volatile image is rendered onto the graphics context of a JComponent. The application has it's own rendering loop which keeps the image scaled and rotated.

      When the FS frame appears, I am trying to ALT+TAB or press the 'Windows' key a few times. After 3-4 trials, I am getting an exception on the console. This happens consistantly in less than 5 trials on my laptop installed with Windows Vista Home Premium (Aero enabled) - Nvidia GeForce 8400M. I reproduced it with 6u10-b11 PIT build and b09 promoted build. The same test goes into an infinite loop on b10 because of another issue.

      Here is the exception:
      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: HDC for component
      at sun.java2d.loops.ScaledBlit.Scale(Native Method)
      at sun.java2d.pipe.DrawImage.scaleSurfaceData(DrawImage.java:956)
      at sun.java2d.pipe.DrawImage.renderImageScale(DrawImage.java:611)
      at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:97)
      at sun.java2d.pipe.DrawImage.scaleImage(DrawImage.java:1018)
      at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2943)
      at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:2894)
      at BufferTestSwingVolatile.render(BufferTestSwingVolatile.java:98)
      at BufferTestSwingVolatile.paintUI(BufferTestSwingVolatile.java:38)
      at BufferTestSwingVolatile.actionPerformed(BufferTestSwingVolatile.java:32)
      at javax.swing.Timer.fireActionPerformed(Timer.java:271)
      at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
      at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      I have attached the sample test herewith. Run the test and just press ALT+TAB/Windows key a few times to see the exception.

      Attachments

        Issue Links

          Activity

            People

              serb Sergey Bylokhov
              pmohansunw Praveen Mohan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: