<Swing Dev> EventQueue NPE?

Petr Pchelko petr.pchelko at oracle.com
Wed Feb 19 09:20:22 UTC 2014


Hello, Keith.

I suppose it was fixed under this bug: https://bugs.openjdk.java.net/browse/JDK-8019623

With best regards. Petr.

On 19.02.2014, at 13:09, Alexander Scherbatiy <alexandr.scherbatiy at oracle.com> wrote:

> On 2/19/2014 8:03 AM, Keith Amling wrote:
>> I may be barking up the wrong tree e-mailing an OpenJDK list when I've
>> only reproduced this against an Oracle JDK (1.7.0_25, and in particular
>> it doesn't reproduce against 1.7.0_21), but the attached file produces
>> NPEs [1] via EventQueue.isDispatchThread() fairly regularly with an
>> argument of 10 [threads] and can even produce it with just 2 (although
>> less often).
>    This is an interesting exception. I am able to reproduce it with the JDK 7u51 but
>    not able to reproduce it with the JDK 8.
> 
>   Could you check that the issue is not reproduced on your side with the latest JDK 8:
>     https://jdk8.java.net/download.html
> 
>> 
>> We've had even weirder NPEs [2] in the code behind that but I have yet
>> to distill them to a repro unfortunately.
>    We have several reports about this NPE like:
>      https://bugs.openjdk.java.net/browse/JDK-8019272
> 
>    It should have been already fixed in JDK 7u60 and in the JDK 8.
> 
>   Thanks,
>   Alexandr.
>> 
>> Are either of these known?  Is there something we should be doing in our
>> rather multi-threaded environment to protect this code?
>> 
>> Keith
>> 
>> [1] E.g.:
>> 
>>> java.lang.NullPointerException
>>> 	at java.awt.EventQueue.isDispatchThread(EventQueue.java:1014)
>>> 	at EQNPE$1.run(EQNPE.java:23)
>> [2] Ending in:
>> 
>>> java.lang.NullPointerException
>>> 	at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:1011)
>>> 	at sun.awt.SunToolkit.getSystemEventQueueImplPP(SunToolkit.java:1007)
>>> 	at sun.awt.HeadlessToolkit.getSystemEventQueueImpl(HeadlessToolkit.java:352)
>>> 	at java.awt.Toolkit.getSystemEventQueue(Toolkit.java:1717)
>>> 	<our code>
> 




More information about the swing-dev mailing list