<AWT Dev> [12] RFR : JDK-8198002 : java/awt/Mixing/Validating.java debug assert on Windows

Ambarish Rapte ambarish.rapte at oracle.com
Wed Nov 7 10:47:43 UTC 2018


Hi Sergey,

> Does it mean that the bug can be reproduced on non-debug build(not an assertion, but functional issue related to the  WS_MAXIMIZE style)? Can it be checked by the test?

1.  The issue occurs in release mode. An incorrect style is set to Frame, but cannot be tested.
---  Issue is that, The code in question should set WS_MAXIMIZE bit to 0 in window's style but in this error case, WS_MAXIMIZE bit is set to 1.

Why it cannot be tested:
2.  Frame.getExtendedState()  always returns correct state saved in Frame.java::int state, set using setExtendedState().

3.  On native side the windows' style is accessed using GetStyle(), This style is not accessed or saved on java side.

4.  When the Frame.MAXIMIZED_BOTH extended state is set while the window is not visible, the state is saved,
---  on java side in Frame.java::state variable and
---  on native side in awtFrame::m_zoomed variable.
---  But it is not actually applied to the window, i.e. WS_MAXIMIZE bit would be 0 and we do not access the style.

5.  A java.awt.event.WindowStateListener added to frame, does not receive any  WINDOW_STATE_CHANGED  event when a state is changed while window is not visible on screen.
---  The state may not be applied when window is not visible and there is no guarantee of receiving any event when the window becomes visible and the state gets applied.

Regards,
Ambarish

-----Original Message-----
From: Sergey Bylokhov 
Sent: Wednesday, November 07, 2018 2:41 AM
To: Ambarish Rapte <ambarish.rapte at oracle.com>; awt-dev at openjdk.java.net
Subject: Re: <AWT Dev> [12] RFR : JDK-8198002 : java/awt/Mixing/Validating.java debug assert on Windows

Hi, Ambarish.

On 06/11/2018 02:36, Ambarish Rapte wrote:
>  3. When MAXIMIZED_BOTH extended state is set before window is shown, it does not reflect in to the window style, i.e. WS_MAXIMIZE style bit won't be set.
>  4. WS_MAXIMIZE is set only after the window is shown, i.e.  after ShowWindow() call

Does it mean that the bug can be reproduced on non-debug build(not an assertion, but functional issue related to the  WS_MAXIMIZE style)? Can it be checked by the test?


-- 
Best regards, Sergey.


More information about the awt-dev mailing list