These steps produce an ArrayIndexOutOfBoundsException
1. Follow Menu Tool/Manage Content Selector to open Setup selectors
2. Type some text in Keyword field
3. Back to the main window and close the current database
4. Back to Setup selector window and click Apply
This will produce the exception trace
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at java.util.Vector.elementAt(Vector.java:430)
at javax.swing.JTabbedPane.getTitleAt(JTabbedPane.java:1091)
at net.sf.jabref.JabRefFrame.getTabTitle(JabRefFrame.java:954)
at net.sf.jabref.BasePanel.markBaseChanged(BasePanel.java:2274)
at net.sf.jabref.BasePanel.markNonUndoableBaseChanged(BasePanel.java:2288)
at net.sf.jabref.ContentSelectorDialog2.applyChanges(ContentSelectorDialog2.java:287)
at net.sf.jabref.ContentSelectorDialog2.access$300(ContentSelectorDialog2.java:16)
at net.sf.jabref.ContentSelectorDialog2$12.actionPerformed(ContentSelectorDialog2.java:224)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6267)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6032)
at java.awt.Container.processEvent(Container.java:2041)
at java.awt.Component.dispatchEventImpl(Component.java:4630)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
at java.awt.Container.dispatchEventImpl(Container.java:2085)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
A similar exception is thrown if we click on new to enable the field name and type some text there
Properly catch and threat the exceptions reported
Is blocking main window while Manage Content Selector dialogue the solution?