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

List:       openjdk-awt-dev
Subject:    Re: <AWT Dev> [14] Review Request: 8233657 Intermittent NPE in Component.validate()
From:       Philip Race <philip.race () oracle ! com>
Date:       2019-11-07 21:20:59
Message-ID: 5DC48ABB.7060101 () oracle ! com
[Download RAW message or body]

OK .. +1

-phil.

On 11/7/19, 1:02 PM, Sergey Bylokhov wrote:
> On 11/7/19 6:29 am, Philip Race wrote:
>> The fix seems fine but if the app isn't setting null how are we 
>> getting null here ?
>
> We get null here only if the test/app sets the null value, in which 
> case this null
> value will be ignored and some other font will be used by the peer.
>
>> Frequent hierarchy validation does not in itself explain that to me.
>
> On HiDPI systems the invisible components use some default fonts 
> render_context/metrics
> and when the component became visible we change these default values 
> to the actual
> HiDPI graphics config ->to a different fonts render_context/metrics -> 
> need to validate
> hierarchy->NPE.
>
>>
>> -phil.
>>
>> On 11/6/19, 2:48 PM, Sergey Bylokhov wrote:
>>> Hello.
>>> Please review the fix for JDK 14.
>>>
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8233657
>>> Fix: http://cr.openjdk.java.net/~serb/8233657/webrev.00
>>>
>>> During testsprint I have analyzed some intermittent failures of our 
>>> tests and
>>> found some intermittent NPE. The root cause is the calling of 
>>> Component.validate()
>>> if the null font is used. The bug reproduced mostly on HiDPI systems 
>>> where we
>>> validate the hierarchy of components more often.
>>>
>>> The validate method is aupdated to use the same logic as setFont(), 
>>> where null value
>>> is ignored and never passed to the peer.
>>>
>>> Actually the fix is simpler than the tests problem listing due to 
>>> product bug.
>>>
>
>
[prev in list] [next in list] [prev in thread] [next in thread] 

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