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

[Windows Server 2016] java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java shows issues in awt_Win32GraphicsDevice.cpp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 17, 21, 22
    • client-libs
    • generic
    • windows

      When running with fastdebug binaries we run intermittent into the issue below in
      jtreg test java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java .
      Seems we miss checking of successful HBITMAP creation before calling GetDIBits ?

        HDC hBMDC = this->GetDC();
        HBITMAP hBM = ::CreateCompatibleBitmap(hBMDC, 1, 1);
        VERIFY(::GetDIBits(hBMDC, hBM, 0, 1, NULL, gpBitmapInfo, DIB_RGB_COLORS));

      in awt_Win32GraphicsDevice.cpp . Thats why the releast of hBMDC / hBM fails as well at the end of the function causing the seond and third warning.


      Sat Nov 18 17:29:23 CET 2023

      *********************
      AWT Assertion Failure
      *********************
      ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0)
      File 'e:\openjdk\openjdk-21u-windows_x86_64-dbg\jdk\src\java.desktop\windows\native\libawt\windows\awt_Win32GraphicsDevice.cpp', at line 184
      GetLastError() is 57 : The parameter is incorrect.

      Do you want to break into the debugger?
      *********************
      *********************
      AWT Assertion Failure
      *********************
      ::DeleteObject(hBM)
      File 'e:\openjdk\openjdk-21u-windows_x86_64-dbg\jdk\src\java.desktop\windows\native\libawt\windows\awt_Win32GraphicsDevice.cpp', at line 297
      GetLastError() is 57 : The parameter is incorrect.

      Do you want to break into the debugger?
      *********************
      *********************
      AWT Assertion Failure
      *********************
      ::DeleteDC(hBMDC)
      File 'e:\openjdk\openjdk-21u-windows_x86_64-dbg\jdk\src\java.desktop\windows\native\libawt\windows\awt_Win32GraphicsDevice.cpp', at line 298
      GetLastError() is 6 : The handle is invalid.

      Do you want to break into the debugger?
      *********************
      java.lang.RuntimeException: The first observer is not called
      at MultiResolutionImageObserverTest.waitForImageLoading(MultiResolutionImageObserverTest.java:77)
      at MultiResolutionImageObserverTest.main(MultiResolutionImageObserverTest.java:54)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
      at java.base/java.lang.Thread.run(Thread.java:1583)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: The first observer is not called
      JavaTest Message: shutting down test

            jdv Jayathirth D V
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: