RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]
Christoph Langer
clanger at openjdk.org
Fri Feb 16 08:46:11 UTC 2024
- Previous message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]
- Next message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On Thu, 15 Feb 2024 22:46:54 GMT, Christoph Langer <clanger at openjdk.org> wrote:
>> src/java.desktop/windows/native/libawt/windows/Devices.cpp line 102:
>>
>>> 100: memset((void*)(&mieInfo), 0, sizeof(MONITORINFOEX));
>>> 101: mieInfo.cbSize = sizeof(MONITORINFOEX);
>>> 102: if (TRUE == ::GetMonitorInfo(hMon, (LPMONITORINFOEX)(&mieInfo))) {
>>
>> The documentation for [`GetMonitorInfo`](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmonitorinfow) says, _<q cite="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmonitorinfow#return-value">If the function succeeds, the return value is nonzero. If the function fails, the return value is zero.</q>_
>>
>> Whereas `TRUE == 1`; therefore the condition should be != 0 or rather simply `if (::GetMonitorInfo(/*params*/))`.
>
> Right, that's what's written. But (in the documentation,) the function is declared as `BOOL GetMonitorInfoW...`. So I could epxect return values of TRUE/FALSE, no?
Addressed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1492136065
- Previous message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]
- Next message (by thread): RFR: 8185862: AWT Assertion Failure in ::GetDIBits(hBMDC, hBM, 0, 1, 0, gpBitmapInfo, 0) 'awt_Win32GraphicsDevice.cpp', at line 185 [v2]
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the client-libs-dev
mailing list