Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Strange exception in event dispatching

1 view
Skip to first unread message

Chris Smith

unread,
Feb 22, 2003, 9:41:18 AM2/22/03
to
Hey,

Anyone seen this? It happens at random undefined points within our
application, but it's become more common recently. It appears to happen
specifically when someone clicks the mouse on a JEditorPane.

java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(Unknown Source)
at sun.awt.im.InputContext.dispatchEvent(Unknown Source)
at sun.awt.im.InputMethodContext.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.mindiq.mindiqweb.devlite.app.DeveloperLite$3.dispatchEvent
(DeveloperLite.java:38)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

(I'm pretty well certain that the one piece of our own code in this
stack trace, which just directly calls the superclass anyway, is not
responsible.)

I've seen bugs in Bug Parade regarding NullPointerException is a method
called from WInputMethod.dispatchEvent, but not in dispatchEvent itself.
From a look at the source code, it appears that WInputMethod keeps track
of the focused component and its nearest native peer, but is somehow
getting back null for the peer. I tried to track that down, but am
getting lost in the details of component/peer relationship, and in what
situations I might expect WInputMethod's getNearestNativePeer method to
return null.

Thanks for any insights.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation

0 new messages