TripleA Logo TripleA Forum
    • TripleA Website
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Tags
    • Register
    • Login

    IllegalStateException

    Scheduled Pinned Locked Moved Bug Reports
    2 Posts 2 Posters 31 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E Offline
      EyesWideShut
      last edited by

      With the newest update, which appears to have fixed the “slap” problem, we are now encountering an IllegalStateException after navigating through the game history.

      The two problems may be unrelated, but this history error did not occur in the previous release.

      The issue seems to happen when a player scrolls or moves through entries in the History panel. After the exception occurs, the map freezes and the game cannot be continued normally. Players have been leaving the bot and then re-entering the game as a temporary workaround.

      Here is the stack trace:

      Exception: java.lang.IllegalStateException
      java.lang.Exception
      at com.google.common.base.Preconditions.checkState(Preconditions.java:518)
      at games.strategy.engine.history.History.getDeltaTo(History.java:111)
      at games.strategy.engine.history.History.gotoNode(History.java:127)
      at games.strategy.triplea.ui.history.HistoryPanel.gotoNode(HistoryPanel.java:269)
      at games.strategy.triplea.ui.history.HistoryPanel.treeSelectionChanged(HistoryPanel.java:257)
      at java.desktop/javax.swing.JTree.fireValueChanged(JTree.java:3019)
      at java.desktop/javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3520)
      at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:650)
      at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1120)
      at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:306)
      at java.desktop/javax.swing.JTree.setSelectionInterval(JTree.java:2636)
      at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Actions.increment(BasicTreeUI.java:4909)
      at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Actions.actionPerformed(BasicTreeUI.java:4590)
      at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1804)
      at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2962)
      at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:3010)
      at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2924)
      at java.desktop/java.awt.Component.processEvent(Component.java:6353)
      at java.desktop/java.awt.Container.processEvent(Container.java:2260)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4958)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4790)
      at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1829)
      at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:874)
      at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1136)
      at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1011)
      at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:839)
      at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4839)
      at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
      at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2671)
      at java.desktop/java.awt.Component.dispatchEvent(Component.java:4790)
      at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:725)
      at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:702)
      at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      Interpretation

      The important part is:

      History.getDeltaTo
      History.gotoNode
      HistoryPanel.gotoNode
      HistoryPanel.treeSelectionChanged

      This indicates that the crash is happening when TripleA tries to move from the current game state to another point in the History tree.

      History.getDeltaTo() is likely attempting to calculate which game-state changes must be applied or reversed in order to display the selected historical position. The Preconditions.checkState() failure means that an internal assumption about the history structure is not true.

      In practical terms, TripleA may be encountering one of these situations:

      the selected history node is no longer connected properly to the current node;
      the history index contains an unexpected or invalid state;
      the client receives a game update while the user is viewing an earlier history entry;
      navigating quickly with the keyboard causes the History panel and game state to become temporarily out of sync.

      The lines involving:

      JTree.setSelectionInterval
      BasicTreeUI$Actions.increment
      processKeyBinding

      strongly suggest that the user was moving through the History tree with the keyboard, probably using the arrow keys.

      The map freezes because the exception occurs on Java’s Swing event-dispatch thread, which controls the interface. Once that thread fails during the history transition, the UI may remain stuck even though the bot-hosted game itself is still running. That would explain why leaving and re-entering restores access: the player reconnects with a fresh client state.

      I would describe this as a client-side history-navigation synchronization bug, possibly triggered when viewing history during a live bot game. It does not necessarily mean that the saved game itself is corrupted.

      C 1 Reply Last reply Reply Quote 1
      • C Offline
        Cernel Moderators Lobby Moderators @EyesWideShut
        last edited by

        @EyesWideShut This looks like a great report, but can you please move it to GitHub (to increase the chance a developer fixing the problem)?

        https://github.com/triplea-game/triplea/issues

        1 Reply Last reply Reply Quote 2

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post
        Powered by NodeBB Forums