Closed Da-Boom closed 5 months ago
possible cause: at src/main/java/dev/isxander/controlify/screenop/compat/vanilla/RecipeBookScreenProcessor.java on line 55 it does int index = tabs.indexOf(selectedTab)
but doesnt check if the return value is -1, when its not found, instead checks if its not 0, which passes if the value is -1. also later that index
variable is used as follows on line 57: button = tabs.get(index - 1);
possible fix:
...
/* L55 */ int index = tabs.indexOf(selectedTab);
// if(index != 0) { <- bad, passes on -1
/* L56 */ if(index > 0) { // now checks if it's not less than or equal to zero which will not pass on -1
/* L57 */ button = tabs.get(index - 1);
/* L58 */ recipeBookComponent.mouseClicked(button.getX(), button.getY(), 0);
/* L59 */ }
...
this was fixed in #234 it won't even reach that index check now
Current Behaviour
during gameplay the play will crash seemingly at random with an IndexOutOfBoundsException on controller tick
Crash Report: crash-2024-02-04_12.43.30-client.txt
Expected Behaviour
The game continues to run without crashing
Screenshots
No response
Reproduction Steps
Logs
Mod Version
1.8.1+1.20.4
Controller
issues
Bluetooth
Operating System
Linux/SteamOS
ARM
Additional Information
Crash Report: crash-2024-02-04_12.43.30-client.txt
using fabulously optimized modpack via modrinth on latest steam deck beta client (v 1706914901, API SteamClient021)
Just to make sure...