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

GraphicsDevice.getDisplayMode() causes EXCEPTION_ACCESS_VIOLATION

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.4.0
    • client-libs
    • x86
    • windows_2000



      Name: rmT116609 Date: 11/04/2001


      java version "1.4.0-beta3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
      Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)


      import java.awt.*;

      public class GetDisplayModeAccessViolation
      {
        public static void main(String[] args)
        {
          GraphicsDevice device = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
          GraphicsConfiguration configuration = device.getDefaultConfiguration();
          Frame frame = new Frame( configuration );
          device.setFullScreenWindow( frame );
          frame.createBufferStrategy( 2 );
          frame.dispose();
          device.getDisplayMode();
        }
      }

      This produces the following error:

      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D06369B
      Function=Java_sun_print_Win32PrintJob_printRawData+0x1C9A
      Library=C:\java\j2sdk1.4.0-beta3\jre\bin\awt.dll

      Current Java thread:
              at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method)
              at sun.awt.Win32GraphicsDevice.getDisplayMode(Win32GraphicsDevice.java:287)
              - locked <02B806F8> (a sun.awt.Win32GraphicsDevice)
              at GetDisplayModeAccessViolation.main(GetDisplayModeAccessViolation.java:13)

      Dynamic libraries:
      0x00400000 - 0x00406000 C:\java\j2sdk1.4.0-beta3\bin\java.exe
      0x77F80000 - 0x77FFB000 C:\WINNT\System32\ntdll.dll
      0x77DB0000 - 0x77E0B000 C:\WINNT\system32\ADVAPI32.dll
      0x77E80000 - 0x77F35000 C:\WINNT\system32\KERNEL32.DLL
      0x77D40000 - 0x77DAC000 C:\WINNT\system32\RPCRT4.DLL
      0x78000000 - 0x78046000 C:\WINNT\system32\MSVCRT.dll
      0x6D330000 - 0x6D441000 C:\java\j2sdk1.4.0-beta3\jre\bin\client\jvm.dll
      0x77E10000 - 0x77E74000 C:\WINNT\system32\USER32.dll
      0x77F40000 - 0x77F7C000 C:\WINNT\system32\GDI32.DLL
      0x77570000 - 0x775A0000 C:\WINNT\System32\WINMM.dll
      0x75E60000 - 0x75E7A000 C:\WINNT\System32\IMM32.DLL
      0x10000000 - 0x1000B000 C:\WINNT\System32\syncpipe.dll
      0x6D1D0000 - 0x6D1D7000 C:\java\j2sdk1.4.0-beta3\jre\bin\hpi.dll
      0x6D300000 - 0x6D30D000 C:\java\j2sdk1.4.0-beta3\jre\bin\verify.dll
      0x6D210000 - 0x6D227000 C:\java\j2sdk1.4.0-beta3\jre\bin\java.dll
      0x6D320000 - 0x6D32D000 C:\java\j2sdk1.4.0-beta3\jre\bin\zip.dll
      0x6D000000 - 0x6D0F6000 C:\java\j2sdk1.4.0-beta3\jre\bin\awt.dll
      0x77800000 - 0x7781D000 C:\WINNT\System32\WINSPOOL.DRV
      0x77A50000 - 0x77B3A000 C:\WINNT\system32\ole32.dll
      0x6D180000 - 0x6D1D0000 C:\java\j2sdk1.4.0-beta3\jre\bin\fontmanager.dll
      0x728A0000 - 0x728A6000 C:\WINNT\System32\DCIMAN32.dll
      0x0CF40000 - 0x0D0CA000 C:\WINNT\System32\nvoglnt.dll
      0x51000000 - 0x51044000 C:\WINNT\System32\ddraw.dll
      0x12020000 - 0x12032000 C:\java\jbuilder5\lib\ext\jbWheel.dll
      0x77920000 - 0x77943000 C:\WINNT\system32\imagehlp.dll
      0x72A00000 - 0x72A2D000 C:\WINNT\system32\DBGHELP.dll
      0x690A0000 - 0x690AB000 C:\WINNT\System32\PSAPI.DLL

      Local Time = Sat Nov 03 14:12:11 2001
      Elapsed Time = 2
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Client VM (1.4.0-beta3-b84 mixed mode)
      #

      It sounds similar to bugs 4452242 and 4464690 but I don't think it's exactly the same.

      Machine: P2 400, 392M, Win2K SP1, DirectX 8
      Video card: Riva TNT2, 32M

      The following code demonstrates the problem (on my system atleast):
      (Review ID: 134952)
      ======================================================================

            mmartaksunw Michael Martak (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: