<AWT Dev> [14] Review Request: 8235638 NPE in LWWindowPeer.getOnscreenGraphics()

Prasanta Sadhukhan prasanta.sadhukhan at oracle.com
Wed Dec 11 09:53:21 UTC 2019


Hi Dmitry,

It seems that webrev is not accessible anymore, but I guess it will be 
good if both the fix can be clubbed together.

Regards

Prasanta

On 11-Dec-19 3:15 PM, Dmitry Markov wrote:
> Hi Prasanta,
>
> I guess the NPE, you observed, is already addressed by 
> https://bugs.openjdk.java.net/browse/JDK-8235739 (which is on review 
> now, see 
> http://mail.openjdk.java.net/pipermail/awt-dev/2019-December/015621.html).
> Can you try with fix for 8235739, please?
>
> Thanks,
> Dmitry
>
>> On 11 Dec 2019, at 09:16, Prasanta Sadhukhan 
>> <prasanta.sadhukhan at oracle.com 
>> <mailto:prasanta.sadhukhan at oracle.com>> wrote:
>>
>> 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/6aa75439/attachment.htm>


More information about the awt-dev mailing list