HearthStats Companion is occasionally failing to start up: it briefly shows the window then disappears with this exception:
java.lang.ArrayIndexOutOfBoundsException: 0
at javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1368)
at javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1311)
at javax.swing.plaf.basic.BasicListUI$Handler.valueChanged(BasicListUI.java:2623)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:184)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:164)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:211)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:405)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:415)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:459)
at javax.swing.JList.setSelectedIndex(JList.java:2210)
at javax.swing.plaf.basic.BasicComboPopup.setListSelection(BasicComboPopup.java:1143)
at javax.swing.plaf.basic.BasicComboPopup.access$300(BasicComboPopup.java:63)
at javax.swing.plaf.basic.BasicComboPopup$Handler.itemStateChanged(BasicComboPopup.java:981)
at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1223)
at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1280)
at javax.swing.JComboBox.contentsChanged(JComboBox.java:1329)
at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:118)
at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:93)
at javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:131)
at javax.swing.JComboBox.addItem(JComboBox.java:716)
at net.hearthstats.ui.DecksTab$DeckSlotPanel.applyDecks(DecksTab.scala:173)
at net.hearthstats.ui.DecksTab$$anonfun$updateDecks$1.apply(DecksTab.scala:80)
at net.hearthstats.ui.DecksTab$$anonfun$updateDecks$1.apply(DecksTab.scala:80)
at scala.collection.Iterator$class.foreach(Iterator.scala:750)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at net.hearthstats.ui.DecksTab.updateDecks(DecksTab.scala:80)
at net.hearthstats.Main$$anonfun$start$1.applyOrElse(Main.scala:82)
at net.hearthstats.Main$$anonfun$start$1.applyOrElse(Main.scala:81)
at scala.concurrent.Future$$anonfun$onSuccess$1.apply(Future.scala:117)
at scala.concurrent.Future$$anonfun$onSuccess$1.apply(Future.scala:115)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at scala.concurrent.impl.ExecutionContextImpl$AdaptedForkJoinTask.exec(ExecutionContextImpl.scala:121)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
I think the deck update is not being done on the EDT thread.
HearthStats Companion is occasionally failing to start up: it briefly shows the window then disappears with this exception:
I think the deck update is not being done on the EDT thread.