Create account / Log in

Exception when deleting a module object - Bug:1866161

Issues with the Vassal engine.

Moderators: Tim M, uckelman

Exception when deleting a module object - Bug:1866161

Postby bsmith » January 7th, 2008, 10:56 am

I've seen this one a few times; Happens when deleting objects (Pieces or Panels etc.) in a module opened for editing.

Code: Select all
-- OS Windows Vista
-- Java version 1.6.0_03
-- VASSAL version 3.0.15
-- Talavera & Vimeiro version 0.5
java.lang.ArrayIndexOutOfBoundsException: -1
   at java.util.Vector.elementAt(Unknown Source)
   at javax.swing.JTabbedPane.getTitleAt(Unknown Source)
   at javax.swing.plaf.basic.BasicTabbedPaneUI$Handler.componentAdded(Unknown Source)
   at java.awt.Container.processContainerEvent(Unknown Source)
   at java.awt.Container.processEvent(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.Container.addImpl(Unknown Source)
   at javax.swing.JTabbedPane.setComponentAt(Unknown Source)
   at VASSAL.build.widget.TabWidget.stateChanged(TabWidget.java:53)
   at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
   at javax.swing.JTabbedPane.removeTabAt(Unknown Source)
   at javax.swing.JTabbedPane.remove(Unknown Source)
   at java.awt.Container.addImpl(Unknown Source)
   at javax.swing.JTabbedPane.setComponentAt(Unknown Source)
   at VASSAL.build.widget.TabWidget.stateChanged(TabWidget.java:53)
   at javax.swing.JTabbedPane.fireStateChanged(Unknown Source)
   at javax.swing.JTabbedPane.removeTabAt(Unknown Source)
   at VASSAL.build.widget.TabWidget.remove(TabWidget.java:80)
   at VASSAL.configure.ConfigureTree.remove(ConfigureTree.java:562)
   at VASSAL.configure.ConfigureTree$8.actionPerformed(ConfigureTree.java:513)
   at VASSAL.configure.ConfigureTree.doKeyAction(ConfigureTree.java:857)
   at VASSAL.configure.ConfigureTree$KeyAction.actionPerformed(ConfigureTree.java:175)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(Unknown Source)
   at javax.swing.SwingUtilities.notifyAction(Unknown Source)
   at javax.swing.JComponent.processKeyBinding(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processKeyBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
   at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
   at javax.swing.JComponent.processKeyBindings(Unknown Source)
   at javax.swing.JComponent.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(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 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(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)
java.lang.IndexOutOfBoundsException: Index: 0, Tab count: 0
   at javax.swing.JTabbedPane.checkIndex(Unknown Source)
   at javax.swing.JTabbedPane.removeTabAt(Unknown Source)
   at VASSAL.build.widget.TabWidget.remove(TabWidget.java:80)
   at VASSAL.configure.ConfigureTree.remove(ConfigureTree.java:562)
   at VASSAL.configure.ConfigureTree$8.actionPerformed(ConfigureTree.java:513)
   at VASSAL.configure.ConfigureTree.doKeyAction(ConfigureTree.java:857)
   at VASSAL.configure.ConfigureTree$KeyAction.actionPerformed(ConfigureTree.java:175)
   at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
   at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
   at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.AbstractButton.doClick(Unknown Source)
   at javax.swing.plaf.basic.BasicMenuItemUI$Actions.actionPerformed(Unknown Source)
   at javax.swing.SwingUtilities.notifyAction(Unknown Source)
   at javax.swing.JComponent.processKeyBinding(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processBindingForKeyStrokeRecursive(Unknown Source)
   at javax.swing.JMenuBar.processKeyBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireBinding(Unknown Source)
   at javax.swing.KeyboardManager.fireKeyboardAction(Unknown Source)
   at javax.swing.JComponent.processKeyBindingsForAllComponents(Unknown Source)
   at javax.swing.JComponent.processKeyBindings(Unknown Source)
   at javax.swing.JComponent.processKeyEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
   at java.awt.Container.processEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
   at java.awt.Component.dispatchEventImpl(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 java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(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)
Last edited by bsmith on January 7th, 2008, 9:08 pm, edited 3 times in total.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby mehrunes » January 7th, 2008, 11:03 am

Encountered this, too. Deleting the entries in the build file helped, but always error messages when deleting in the editor.
Apologize my bad english - I'm not a native speaker. ;)
mehrunes
 
Posts: 84
Joined: December 28th, 2007, 1:33 am

Postby bsmith » January 7th, 2008, 11:04 am

To re-produce, open this module for editing.

Then Delete ->[Game Piece Palette]->Pieces->Talavera[Panel]
Attachments
Aspern-Essling v0.1.vmod.zip
(58.15 KiB) Downloaded 310 times
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby Teufelhunde87 » January 9th, 2008, 9:30 pm

I've noticed this when deleting the only(or final ) file in a menu. I usually get around it by adding my new topic in the menu, moving it to 1st position and then deleting. If that isn't applicable, sometimes I just delete the whole menu and re-enter the menu.
Teufelhunde87
 
Posts: 7
Joined: January 8th, 2008, 10:05 pm
Location: Pennsylvania

Postby uckelman » January 18th, 2008, 11:32 pm

I think I've fixed this bug in 2860:

http://www.nomic.net/~uckelman/tmp/vass ... vn2860.zip

We weren't removing the change listener from the JTabbedPane before
removing the tab, so the change listener was called by removeTabAt()
and received a bogus index.

BTW, I've noticed another odd behavior here, namely that if you
create a panel as a tab and type in the name, it picks up the first
one or two letters in the actual tab title, but then no more. Odd.
User avatar
uckelman
Site Admin
 
Posts: 8380
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby bsmith » January 19th, 2008, 2:46 am

Joel you may want to check with Brent, I think he has also resolved this. In the merge thread he said:

"Hi Joel, Rodney,

Have also killed the Deleting Basic Piece bug in swampwallaby-merge@2856

Regards,
Brent."
Current PBEMs:- Tunisia, ASL, Vimeiro, Europe Engulfed, EuroFront II.
User avatar
bsmith
Site Admin
 
Posts: 657
Joined: October 2nd, 2007, 4:47 pm

Postby Brent Easton » January 19th, 2008, 4:16 am

Joel you may want to check with Brent, I think he has also resolved this.


No, these are two different issues.

Brent.
User avatar
Brent Easton
 
Posts: 2880
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia


Return to Technical Support & Bugs

Who is online

Users browsing this forum: Bing [Bot] and 4 guests