NullPointerException in javax.swing.text.SimpleAttributeSet.addAttribute

Posted by Paul Reiners on Stack Overflow See other posts from Stack Overflow or by Paul Reiners
Published on 2010-04-08T14:59:26Z Indexed on 2010/04/08 15:03 UTC
Read the original article Hit count: 359

Has anyone ever seen an exception like this?:

ERROR: java.lang.NullPointerException: null
                            at java.util.Hashtable.put(null:-1)
                            at javax.swing.text.SimpleAttributeSet.addAttribute(null:-1)
                            at javax.swing.text.SimpleAttributeSet.addAttributes(null:-1)
                            at javax.swing.text.StyledEditorKit.createInputAttributes(null:-1)
                            at javax.swing.text.StyledEditorKit$AttributeTracker.updateInputAttributes(null:-1)
                            at javax.swing.text.StyledEditorKit$AttributeTracker.caretUpdate(null:-1)
                            at javax.swing.text.JTextComponent.fireCaretUpdate(null:-1)
                            at javax.swing.text.JTextComponent$MutableCaretEvent.fire(null:-1)
                            at javax.swing.text.JTextComponent$MutableCaretEvent.mouseReleased(null:-1)
                            at java.awt.AWTEventMulticaster.mouseReleased(null:-1)
                            at java.awt.AWTEventMulticaster.mouseReleased(null:-1)
                            at java.awt.Component.processMouseEvent(null:-1)
                            at javax.swing.JComponent.processMouseEvent(null:-1)
                            at java.awt.Component.processEvent(null:-1)
                            at java.awt.Container.processEvent(null:-1)
                            at java.awt.Component.dispatchEventImpl(null:-1)
                            at java.awt.Container.dispatchEventImpl(null:-1)
                            at java.awt.Component.dispatchEvent(null:-1)
                            at java.awt.LightweightDispatcher.retargetMouseEvent(null:-1)
                            at java.awt.LightweightDispatcher.processMouseEvent(null:-1)
                            at java.awt.LightweightDispatcher.dispatchEvent(null:-1)
                            at java.awt.Container.dispatchEventImpl(null:-1)
                            at java.awt.Window.dispatchEventImpl(null:-1)
                            at java.awt.Component.dispatchEvent(null:-1)
                            at java.awt.EventQueue.dispatchEvent(null:-1)
                            at java.awt.EventDispatchThread.pumpOneEventForFilters(null:-1)
                            at java.awt.EventDispatchThread.pumpEventsForFilter(null:-1)
                            at java.awt.EventDispatchThread.pumpEventsForHierarchy(null:-1)
                            at java.awt.EventDispatchThread.pumpEvents(null:-1)
                            at java.awt.EventDispatchThread.pumpEvents(null:-1)
                            at java.awt.EventDispatchThread.run(null:-1)

I wish I could tell you an easy way to reproduce this, but I can’t. It’s happening in a Java Swing application I maintain. It happens infrequently and the application is quite complex.

I know it’s a bit of a long shot just showing this stack trace, but I thought I’d try.

© Stack Overflow or respective owner

Related posts about nullpointerexception

Related posts about java