RFR: JDK-8320405: [Windows Server 2016] java/awt/image/MultiResolutionImage/MultiResolutionImageObserverTest.java shows issues in awt_Win32GraphicsDevice.cpp
Sergey Bylokhov
serb at openjdk.org
Wed Jan 3 00:41:48 UTC 2024
On Tue, 2 Jan 2024 20:04:39 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:
>> src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp line 194:
>>
>>> 192: if (hBM == NULL) {
>>> 193: J2dTraceLn(J2D_TRACE_WARNING, "AwtWin32GraphicsDevice::Initialize CreateCompatibleBitmap failed");
>>> 194: }
>>
>> Does it make sense to call `::GetLastError()` and trace its value?
>>
>> It seems that we cannot continue if `hBMDC` or `hBM` are null. Yet it seems unexpected.
>
>> It seems that we cannot continue if `hBMDC` or `hBM` are null. Yet it seems unexpected.
>
> Should we rather modify the code to back out and not to call APIs with NULL handles?
I think we should fallback to something. The bug itself looks similar to this: https://bugs.openjdk.org/browse/JDK-8185862
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17197#discussion_r1439981113
More information about the client-libs-dev
mailing list