<AWT Dev> [11][JDK-8152974] AWT hang occurs when sequenced events

Krishna Addepalli krishna.addepalli at oracle.com
Thu Mar 15 16:59:23 UTC 2018


Hi Semyon,

SequencedEvent is created with FOCUS_LAST + 1 as its id, whereas when it is dispatching events, it is looking for FOCUS_LAST + 2, which is causing the hang.
I have modified it to look for only FOCUS_LAST + 1 events, which has fixed the problem.

Thanks,
Krishna

-----Original Message-----
From: Semyon Sadetsky 
Sent: Thursday, March 15, 2018 9:14 PM
To: Krishna Addepalli <krishna.addepalli at oracle.com>; awt-dev at openjdk.java.net
Subject: Re: <AWT Dev> [11][JDK-8152974] AWT hang occurs when sequenced events

Hi Krishna,

You have replaced FOCUS_LAST+2 with the FOCUS_LAST+1 which is absolutely different event.

They can be used interchangeably?

--Semyon


On 03/14/2018 07:53 AM, Krishna Addepalli wrote:
> Hi Sergey,
>
> As per our discussion, I have modified the fix to process only SequencedEvents and ignore others. I have also modified the test case to include some dummy events between two SequencedEvents, and it works.
> Here is the new webrev: 
> http://cr.openjdk.java.net/~kaddepalli/8152974/webrev01/
>
> However, could you point me to a doc/spec which says that all the SequencedEvents have to be processed together, even if other events in the queue have arrived before?
>
> Thanks,
> Krishna
>
> -----Original Message-----
> From: Krishna Addepalli
> Sent: Saturday, February 17, 2018 7:57 AM
> To: Sergey Bylokhov <sergey.bylokhov at oracle.com>; 
> awt-dev at openjdk.java.net; Semyon Sadetsky <semyon.sadetsky at oracle.com>
> Subject: RE: <AWT Dev> [11][JDK-8152974] AWT hang occurs when 
> sequenced events
>
> Hi Sergey,
>
> The event is present, but with the id "java.awt.event.FocusEvent.FOCUS_LAST+1", whereas when it is pumping the events, it is looking for "java.awt.event.FocusEvent.FOCUS_LAST+2", which is not in the queue.
>
> Thanks,
> Krishna
>
> -----Original Message-----
> From: Sergey Bylokhov
> Sent: Saturday, February 17, 2018 1:49 AM
> To: Krishna Addepalli <krishna.addepalli at oracle.com>; 
> awt-dev at openjdk.java.net; Semyon Sadetsky <semyon.sadetsky at oracle.com>
> Subject: Re: <AWT Dev> [11][JDK-8152974] AWT hang occurs when 
> sequenced events
>
> Hi, Krishna.
> On 16/02/2018 00:42, Krishna Addepalli wrote:
>> The SentEvent.ID value is "java.awt.event.FocusEvent.FOCUS_LAST+2", and when in the function pumpOneEventForFilters, it tries to call EventQueue.getNextEvent(id), it looks for SentEvent.ID, which is not present, and then the queue blocks in the hope that someone will post that event. This is what is leading to the hang.
> But both events are posted by the test, why the second event is not present in the queue?
>
>



More information about the awt-dev mailing list