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

PIT:OGL: VM crash when changing the display mode from 32 bit to 8 bit programmatically, Win32

    Details

    • Subcomponent:
      2d
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      I am running an application which opens up a frame in FullScreen mode and displays all the display modes supported by the default GD. My current display mode is : (1024, 768, 32, 60). I am selecting (640, 480, 32, 60) display mode and clicking 'Set Display'. The display mode is set properly. Now I am selecting (640, 480, 8, 60) display mode and clicking 'Set Display'. As soon as I call GD.setDisplayMode() the VM crashes on the PIT build with OGL enabled.

      I am running this on WinXP-Prof sp2 which has Nvidia GeForce4 MX4000 video card with 77.77 driver. This crash is seen only on the PIT build. On the promoted build (Mustang-b50), I am getting a ClassCastException which is given below:

      Exception on Mustang-b50:
      -------------------------
      Exception in thread "AWT-Windows" java.lang.ClassCastException: sun.awt.Win32GraphicsConfig cannot be cast to sun.java2d.opengl.WGLGraphicsConfig
      at sun.java2d.opengl.WGLVolatileSurfaceManager.initAcceleratedSurface(WGLVolatileSurfaceManager.java:56)
      at sun.awt.image.VolatileSurfaceManager.validate(VolatileSurfaceManager.java:158)
      at sun.awt.image.SunVolatileImage.validate(SunVolatileImage.java:229)
      at java.awt.Component$BltBufferStrategy.revalidate(Component.java:3924)
      at java.awt.Component$BltSubRegionBufferStrategy.validateAndShow(Component.java:4016)
      at javax.swing.BufferStrategyPaintManager.show(BufferStrategyPaintManager.java:243)
      at javax.swing.RepaintManager.show(RepaintManager.java:1112)
      at javax.swing.SwingPaintEventDispatcher.createPaintEvent(SwingPaintEventDispatcher.java:43)
      at sun.awt.windows.WComponentPeer.postPaintIfNecessary(WComponentPeer.java:641)
      at sun.awt.windows.WComponentPeer.handleExpose(WComponentPeer.java:625)
      at sun.awt.windows.WToolkit.eventLoop(Native Method)
      at sun.awt.windows.WToolkit.run(WToolkit.java:277)
      at java.lang.Thread.run(Thread.java:608)

      FS frame turns black when changing from 32 bit to 16 bit display mode (Say from (640,480,32,60) to (640, 480,16,60) on PIT build as well as Mustang-b50).

      Here is the PIT build:
      java version "1.6.0-internal"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-internal-java2d_28_aug_2005_21_23-b00)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b49, mixed mode)

      VM Crash log on the PIT build:
      ------------------------------
      #
      # An unexpected error has been detected by HotSpot Virtual Machine:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0b3b6919, pid=3676, tid=3788
      #
      # Java VM: Java HotSpot(TM) Client VM (1.6.0-ea-b49 mixed mode)
      # Problematic frame:
      # C [awt.dll+0x126919]
      #

      --------------- T H R E A D ---------------

      Current thread (0x0b142700): JavaThread "AWT-EventQueue-0" [_thread_in_native, id=3788]

      siginfo: ExceptionCode=0xc0000005, reading address 0x0b1c4010

      Registers:
      EAX=0x0b0c05a0, EBX=0x0aab05d2, ECX=0x0aac42d0, EDX=0x0b1c3ff8
      ESP=0x0d1ff61c, EBP=0x00000000, ESI=0x0b1427b8, EDI=0x0b142900
      EIP=0x0b3b6919, EFLAGS=0x00010296

      Top of Stack: (sp=0x0d1ff61c)
      0x0d1ff61c: 0b1427b8 0b3b7c09 00000000 0d1ff63c
      0x0d1ff62c: 0b142700 06c6bac8 0d1ff688 06c6bac8
      0x0d1ff63c: 00000000 00000000 00000000 00000000
      0x0d1ff64c: 008b9d9c 0b1427b8 0d1ff69c 00000000
      0x0d1ff65c: 0d1ff6c0 00000280 000001e0 0d1ff668
      0x0d1ff66c: 00000000 0d1ff69c 06c6c9e8 00000000
      0x0d1ff67c: 06c6bac8 00000000 0d1ff698 0d1ff6c0
      0x0d1ff68c: 008b2d67 00000000 008b810c 00000000

      Instructions: (pc=0x0b3b6919)
      0x0b3b6909: 8b fb ff 8b 4c 24 08 8b 14 88 8b 0d 60 95 40 0b
      0x0b3b6919: 8b 72 18 e8 4f 8b fb ff 8b c6 5e c3 cc cc cc cc


      Stack: [0x0d100000,0x0d200000), sp=0x0d1ff61c, free space=1021k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      C [awt.dll+0x126919]

      [error occurred during error reporting, step 120, id 0xc0000005]

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j sun.awt.Win32GraphicsConfig.getBounds(I)Ljava/awt/Rectangle;+0
      j sun.awt.Win32GraphicsConfig.getBounds()Ljava/awt/Rectangle;+8
      j sun.awt.Win32GraphicsDevice.setDisplayMode(Ljava/awt/DisplayMode;)V+95
      j DisplayModeTest.actionPerformed(Ljava/awt/event/ActionEvent;)V+74
      j javax.swing.AbstractButton.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+84
      j javax.swing.AbstractButton$Handler.actionPerformed(Ljava/awt/event/ActionEvent;)V+5
      j javax.swing.DefaultButtonModel.fireActionPerformed(Ljava/awt/event/ActionEvent;)V+35
      j javax.swing.DefaultButtonModel.setPressed(Z)V+117
      j javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Ljava/awt/event/MouseEvent;)V+35
      j java.awt.Component.processMouseEvent(Ljava/awt/event/MouseEvent;)V+64
      j javax.swing.JComponent.processMouseEvent(Ljava/awt/event/MouseEvent;)V+23
      j java.awt.Component.processEvent(Ljava/awt/AWTEvent;)V+81
      j java.awt.Container.processEvent(Ljava/awt/AWTEvent;)V+18
      j java.awt.Component.dispatchEventImpl(Ljava/awt/AWTEvent;)V+538
      j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+42
      J java.awt.LightweightDispatcher.retargetMouseEvent(Ljava/awt/Component;ILjava/awt/event/MouseEvent;)V
      j java.awt.LightweightDispatcher.processMouseEvent(Ljava/awt/event/MouseEvent;)Z+139
      j java.awt.LightweightDispatcher.dispatchEvent(Ljava/awt/AWTEvent;)Z+50
      j java.awt.Container.dispatchEventImpl(Ljava/awt/AWTEvent;)V+12
      j java.awt.Window.dispatchEventImpl(Ljava/awt/AWTEvent;)V+19
      j java.awt.Component.dispatchEvent(Ljava/awt/AWTEvent;)V+2
      j java.awt.EventQueue.dispatchEvent(Ljava/awt/AWTEvent;)V+46
      j java.awt.EventDispatchThread.pumpOneEventForFilters(I)Z+156
      j java.awt.EventDispatchThread.pumpEventsForFilter(ILjava/awt/Conditional;Ljava/awt/EventFilter;)V+30
      j java.awt.EventDispatchThread.pumpEventsForHierarchy(ILjava/awt/Conditional;Ljava/awt/Component;)V+11
      j java.awt.EventDispatchThread.pumpEvents(ILjava/awt/Conditional;)V+4
      j java.awt.EventDispatchThread.pumpEvents(Ljava/awt/Conditional;)V+3
      j java.awt.EventDispatchThread.run()V+9
      v ~StubRoutines::call_stub

      --------------- P R O C E S S ---------------

      Java Threads: ( => current thread )
        0x0b1b9200 JavaThread "TimerQueue" daemon [_thread_blocked, id=2804]
        0x00037100 JavaThread "DestroyJavaVM" [_thread_blocked, id=1320]
      =>0x0b142700 JavaThread "AWT-EventQueue-0" [_thread_in_native, id=3788]
        0x0aacf100 JavaThread "AWT-Windows" daemon [_thread_in_native, id=2488]
        0x0b0a6000 JavaThread "AWT-Shutdown" [_thread_blocked, id=2508]
        0x0b0f4e00 JavaThread "Java2D Queue Flusher" daemon [_thread_blocked, id=3880]
        0x0b0ecd00 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=2484]
        0x0aacb700 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3584]
        0x0aac9200 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3616]
        0x0aac8400 JavaThread "Attach Listener" daemon [_thread_blocked, id=3620]
        0x0aac7900 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=688]
        0x0aab3700 JavaThread "Finalizer" daemon [_thread_blocked, id=3612]
        0x0aab2200 JavaThread "Reference Handler" daemon [_thread_blocked, id=1756]

      Other Threads:
        0x0aaadc00 VMThread [id=2436]
        0x0aacca00 WatcherThread [id=3488]

      VM state:not at safepoint (normal execution)

      VM Mutex/Monitor currently owned by a thread: None

      Heap
       def new generation total 576K, used 322K [0x02930000, 0x029d0000, 0x02e10000)
        eden space 512K, 62% used [0x02930000, 0x02980a18, 0x029b0000)
        from space 64K, 0% used [0x029b0000, 0x029b0000, 0x029c0000)
        to space 64K, 0% used [0x029c0000, 0x029c0000, 0x029d0000)
       tenured generation total 4484K, used 3549K [0x02e10000, 0x03271000, 0x06930000)
         the space 4484K, 79% used [0x02e10000, 0x03187590, 0x03187600, 0x03271000)
       compacting perm gen total 12288K, used 6595K [0x06930000, 0x07530000, 0x0a930000)
         the space 12288K, 53% used [0x06930000, 0x06fa0db0, 0x06fa0e00, 0x07530000)
      No shared spaces configured.

      Dynamic libraries:
      0x00400000 - 0x00415000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\bin\java.exe
      0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
      0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
      0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
      0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
      0x7c340000 - 0x7c396000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\bin\MSVCR71.dll
      0x6da40000 - 0x6dc52000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\client\jvm.dll
      0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
      0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
      0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
      0x7c3a0000 - 0x7c41b000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\bin\MSVCP71.dll
      0x10000000 - 0x10008000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\hpi.dll
      0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL
      0x003c0000 - 0x003cc000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\verify.dll
      0x003d0000 - 0x003f0000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\java.dll
      0x003f0000 - 0x003ff000 y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\zip.dll
      0x0b290000 - 0x0b443000 Y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\awt.dll
      0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
      0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
      0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.dll
      0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
      0x5ed00000 - 0x5edcc000 C:\WINDOWS\system32\opengl32.dll
      0x68b20000 - 0x68b40000 C:\WINDOWS\system32\GLU32.dll
      0x73760000 - 0x737a9000 C:\WINDOWS\system32\DDRAW.dll
      0x73bc0000 - 0x73bc6000 C:\WINDOWS\system32\DCIMAN32.dll
      0x0b770000 - 0x0b7c0000 Y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\fontmanager.dll
      0x0b9c0000 - 0x0bb2f000 C:\WINDOWS\system32\nview.dll
      0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
      0x7c9c0000 - 0x7d1d4000 C:\WINDOWS\system32\SHELL32.dll
      0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
      0x5d090000 - 0x5d127000 C:\WINDOWS\system32\COMCTL32.dll
      0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
      0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
      0x77690000 - 0x776b1000 C:\WINDOWS\system32\NTMARTA.DLL
      0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
      0x71bf0000 - 0x71c03000 C:\WINDOWS\system32\SAMLIB.dll
      0x69500000 - 0x699f3000 C:\WINDOWS\system32\nvoglnt.dll
      0x0c2e0000 - 0x0c2f3000 Y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\net.dll
      0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
      0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
      0x0c2a0000 - 0x0c2a9000 Y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\jre\bin\nio.dll
      0x0b470000 - 0x0b485000 C:\WINDOWS\system32\nvwddi.dll

      VM Arguments:
      jvm_args: -Dsun.java2d.opengl=True
      java_command: DisplayModeTest
      Launcher Type: SUN_STANDARD

      Environment Variables:
      PATH=y:\disk05\2d-SQE\PIT\2005-08-28.mustang\windows-i586\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\PROGRA~1\MKSTOO~1\bin;C:\PROGRA~1\MKSTOO~1\bin\x11;C:\PROGRA~1\MKSTOO~1\mksnt;C:\PROGRA~1\ULTRAE~1
      USERNAME=praveen
      SHELL=C:/PROGRA~1/MKSTOO~1/mksnt/sh.exe
      DISPLAY=:0.0
      OS=Windows_NT
      PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel



      --------------- S Y S T E M ---------------

      OS: Windows XP Build 2600 Service Pack 2

      CPU:total 1 family 15, cmov, cx8, fxsr, mmx, ht

      Memory: 4k page, physical 522992k(214744k free), swap 1278288k(964488k free)

      vm_info: Java HotSpot(TM) Client VM (1.6.0-ea-b49) for windows-x86, built on Aug 25 2005 02:02:25 by "java_re" with unknown MS VC++:1310
      ---------------------------------------------------------------------

      I have attached a sample test. Execute the test on Win32 with OGL flag. Select the display modes in the order specified above. If you see a VM crash, the bug is reproduced.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                campbell Christopher Campbell (Inactive)
                Reporter:
                pmohansunw Praveen Mohan (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: