[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: JDK-8320405: [Windows Server 2016] java/awt/image/MultiResolutionImage/MultiResolutionImage
From:       Christoph Langer <clanger () openjdk ! org>
Date:       2024-01-25 6:16:27
Message-ID: u9O2HLFCj54HUU_3im4gulaNZnte2U2m2QN4ygUCLwA=.a6d06467-7e1f-4cba-8b2e-01c86a1e066a () github ! com
[Download RAW message or body]

On Thu, 11 Jan 2024 16:52:40 GMT, Matthias Baesken <mbaesken@openjdk.org> wrote:

> > 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.
> > 
> > So it seems, we should have some additional checks/tracing.
> 
> Matthias Baesken has updated the pull request incrementally with one additional \
> commit since the last revision: 
> do not call CreateCompatibleBitmap if hBMDC is NULL, do not call GetDIBits if hBM \
> is NULL

I agree, maybe in that kind of headless environment it could make sense to not \
initialize screens. I'll play with it and hopefully come back with something on \
[JDK-8185862](https://bugs.openjdk.org/browse/JDK-8185862). At least it seems we have \
such an environment in our configuration, so I can test there. Let's close this PR.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17197#issuecomment-1909421356


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic