DestinationSol icon indicating copy to clipboard operation
DestinationSol copied to clipboard

list highlight crashing program

Open Nikomaru opened this issue 8 months ago • 1 comments

What you were trying to do

selling items to a planetary trade post

What actually happened

I sold the last item on my list and the highlight disappeared. I tapped up to restore it and the program crashed

How to reproduce

  1. enter trade talks
  2. sell last item on list
  3. tap a direction

Game version

2.1.0

Log details

`java.lang.IndexOutOfBoundsException: Index: 7, Size: 7 at java.util.ArrayList.rangeCheck(ArrayList.java:659) at java.util.ArrayList.get(ArrayList.java:435) at org.destinationsol.game.item.ItemContainer.getGroup(ItemContainer.java:169) at org.destinationsol.ui.nui.screens.InventoryScreen.onKeyEvent(InventoryScreen.java:272) at org.destinationsol.ui.nui.NUIManager.update(NUIManager.java:211) at org.destinationsol.SolApplication.update(SolApplication.java:264) at org.destinationsol.SolApplication.safeUpdate(SolApplication.java:241) at org.destinationsol.SolApplication.render(SolApplication.java:205) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:403) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:143) at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.(Lwjgl3Application.java:116) at org.destinationsol.desktop.SolDesktop.main(SolDesktop.java:138)

`

Operating System

Windows

Additional Info

probably have the highlight go to the previous item? I notice when I'm at the top of the list it drops to the next item even as the list updates and moves all the items up one. Actually, when I'm anywhere in the list, the highlight moves to the next position.

Nikomaru avatar Apr 05 '25 13:04 Nikomaru

#712 should fix this. Would you mind testing it to see if it fixes the issue for you? You can find a pre-built version here.

BenjaminAmos avatar Apr 06 '25 13:04 BenjaminAmos