<AWT Dev> [14] Review Request: 8235638 NPE in LWWindowPeer.getOnscreenGraphics()
Prasanta Sadhukhan
prasanta.sadhukhan at oracle.com
Wed Dec 11 09:16:11 UTC 2019
Hi Sergey,
The regression test fails for me on windows with NPE
java.lang.NullPointerException
at java.desktop/sun.awt.windows.WComponentPeer.getGraphics(WComponentPeer.java:582)
at java.desktop/java.awt.Component.getGraphics(Component.java:3124)
at GetGraphicsStressTest.lambda$test$2(GetGraphicsStressTest.java:63)
at java.base/java.lang.Thread.run(Thread.java:833)
Probably we need to do a null check there in windows too.
Regards
Prasanta
On 11-Dec-19 1:02 AM, Sergey Bylokhov wrote:
> Hello.
> Please review the fix for JDK 14.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8235638
> Fix: http://cr.openjdk.java.net/~serb/8235638/webrev.00
>
> I have found a root cause of intermittent failures of some stress
> tests in the JDK on macOS.
> Such tests usually show/hide a lot of frames, and fails because of NPE
> in the
> LWWindowPeer.getOnscreenGraphics()
> The reason is incorrect null check. We should read the surfaceData to
> the local var apply a
> null check and then use it, otherwise, the data may be changed to null
> after the check.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/awt-dev/attachments/20191211/01a61f54/attachment.htm>
More information about the awt-dev
mailing list