Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#3770 NullPointerException with non-existing toolbar icon

open
nobody
None
5
2012-12-27
2012-12-27
Bao N. Nguyen
No

The following steps will print to the terminal a NullPointerException in JEdit 5.0.0

1. Start jEdit with the -log=1 on to enable log
2. Follow the menu Plugin/Plugin Options
3. Select Tool Bar in the tree
4. Click Add button (the +) to open the "Edit Tool Bar Entry" window
5. Enable Load icon from file
6. Click No icon selected to open he File Browser
7. Enter a non-existing file name
8. Click Open
9, Click OK in Edit Tool Bar Entry

Exception trace:

0:25:18 PM [AWT-EventQueue-0] [warning] GUIUtilities: showVFSFileDialog(): given null view, assuming jEdit.getActiveView()
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: Exception occurred during event dispatching:
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: java.lang.NullPointerException
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.options.ToolBarEditDialog.getSelection(ToolBarOptionPane.java:660)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.options.ToolBarOptionPane$ActionHandler.actionPerformed(ToolBarOptionPane.java:332)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processMouseEvent(Component.java:6389)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.JComponent.processMouseEvent(JComponent.java:3268)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processEvent(Component.java:6154)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.processEvent(Container.java:2045)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEventImpl(Component.java:4750)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Container.java:2103)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Component.java:4576)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Container.java:2089)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Window.dispatchEventImpl(Window.java:2518)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Component.java:4576)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.access$400(EventQueue.java:96)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(EventQueue.java:631)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(EventQueue.java:629)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$3.run(EventQueue.java:645)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$3.run(EventQueue.java:643)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEvent(EventQueue.java:642)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:194)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog$1.run(Dialog.java:1073)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog$3.run(Dialog.java:1127)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog.show(Dialog.java:1125)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.show(Component.java:1672)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.setVisible(Component.java:1624)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Window.setVisible(Window.java:882)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Dialog.setVisible(Dialog.java:1012)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.gui.OptionsDialog.init(OptionsDialog.java:374)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.options.GlobalOptions.init(GlobalOptions.java:101)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.gui.OptionsDialog.<init>(OptionsDialog.java:72)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.options.GlobalOptions.<init>(GlobalOptions.java:46)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at org.gjt.sp.jedit.pluginmgr.PluginManager$ActionHandler.actionPerformed(PluginManager.java:377)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processMouseEvent(Component.java:6389)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at javax.swing.JComponent.processMouseEvent(JComponent.java:3268)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.processEvent(Component.java:6154)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.processEvent(Container.java:2045)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEventImpl(Component.java:4750)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Container.java:2103)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Component.java:4576)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Container.dispatchEventImpl(Container.java:2089)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Window.dispatchEventImpl(Window.java:2518)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.Component.dispatchEvent(Component.java:4576)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:672)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.access$400(EventQueue.java:96)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(EventQueue.java:631)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$2.run(EventQueue.java:629)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$3.run(EventQueue.java:645)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue$3.run(EventQueue.java:643)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessController.doPrivileged(Native Method)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventQueue.dispatchEvent(EventQueue.java:642)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
10:25:25 PM [AWT-EventQueue-0] [error] AWT-EventQueue-0: at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

Discussion

  • danisluk
    danisluk
    2013-02-27

    Hello, I d like to take care of this.

     
  • danisluk
    danisluk
    2013-02-28

    Hello, I tried to reproduce this bug on today build, version jEdit 5.1pre1 . It s a minor bug, does not cause app crash or anythink else. I am working on it.