-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
17, 21, 22
-
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
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
- duplicates
-
JDK-8185862 AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185
-
- Resolved
-
- links to
-
Review openjdk/jdk/17197