Encounter Null Pointer Exception when program is entered

T

terry

I encounter the following exception when my program is executed. Could
anyone tell me what has happened? The most trouble is that the error
does not always happen.

Thanks!

java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:253)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:238)
at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:180)
at java.awt.Component.dispatchEventImpl(Component.java:3565)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3323)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3180)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
 
S

Sudsy

terry said:
I encounter the following exception when my program is executed. Could
anyone tell me what has happened? The most trouble is that the error
does not always happen.

Thanks!

java.lang.NullPointerException
at sun.awt.windows.WInputMethod.dispatchEvent(WInputMethod.java:253)
at sun.awt.im.InputContext.dispatchEvent(InputContext.java:238)
at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:180)
at java.awt.Component.dispatchEventImpl(Component.java:3565)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.trackMouseEnterExit(Container.java:3323)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3180)

Can't tell more without seeing the source, but the stack trace seems
to indicate that it's attempting to process a mouse movement event.
Could it be that you've added a listener of null or the listener is
implemented in an object which has been gc'd?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top