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

NPE when removing one of the monitors at runtime, win32

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6u2
    • client-libs
    • 2d
    • x86
    • windows_xp

      I am running a swing application which opens up a JFrame on each monitor in a multi-mon virtual screen system. When both the frames are shown, I am opening the display settings and removing one of the monitors. This was crashing the VM on JDK6-FCS but on 6u2-b01, it throws a NullPointerException. This exception is intermittent but I was able to reproduce 5 out of 10 times. This was reproduced on WinXPProf with ATI Radeon 9600 video card. This was not reproducible on WinXP with Nvidia GeForce4 FX5900. So I tend to think that it could be video card specific.

      Here is the exception -
      Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
      at sun.awt.image.VolatileSurfaceManager.displayChanged(VolatileSurfaceManager.java:316)
      at sun.awt.SunDisplayChanger.notifyListeners(SunDisplayChanger.java:102)
      at sun.awt.Win32GraphicsEnvironment.displayChanged(Win32GraphicsEnvironment.java:175)
      at sun.awt.windows.WToolkit$4.run(WToolkit.java:755)
      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)

      To reproduce the bug, run the attached test on the specified config using 6u2-b01. When both the frames appear in the respective monitors, go to display settings and remove the secondary monitor. Ideally, the frame on the sec monitor should be moved to the primary. But if you see the above exception on the console, the bug is reproduced.

            tdv Dmitri Trembovetski (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: