isXander / Controlify

Another controller mod - for fabric!
https://www.isxander.dev/mods/controlify
GNU Lesser General Public License v3.0
155 stars 36 forks source link

[Bug] Intermittent crash in inventory screen (ArrayIndexOutOfBoundsException) #405

Open SilentException opened 2 months ago

SilentException commented 2 months ago

Current Behaviour

Sometimes, when interacting fast with inventory screen Minecraft will hard crash. Every time it happens the error in the log is the same, related to Controlify CreativeModeInventoryScreenProcessor and ArrayIndexOutOfBoundsException.

Looking at the CreativeModeInventoryScreenProcessor.java it is logical why it could happen (there are no checks in place) but not why it does happen. Might be worth checking out.

Expected Behaviour

No hard crash

Screenshots

No response

Reproduction Steps

It is not easily reproducible but it does happen from time to time. Only when fast clicking / timing issue?

Logs

Log attached

Mod Version

2.0.0-beta.14+1.21-fabric

Controller

Steam Deck

Bluetooth

Operating System

Linux/SteamOS

ARM

Additional Information

crash-2024-08-23_16.45.20-client.txt

Just to make sure...

SilentException commented 1 month ago

From the Discord:

reporting a bug: when i click the r1 button to cycle through inventory slots it “crashes”after the last one (not really a crash, it saves the world and then quits). able to consistently replicate. using prism launcher 8.4 for minecraft 1.21.1, controlify version 2.0.0-beta.14

Checked, that's how it is reproducible.

Rover656 commented 2 weeks ago

Just to add to the conversation here, I took a look into this problem and discovered it is a Fabric API bug. I've submitted a pull request to Fabric to fix this bug: https://github.com/FabricMC/fabric/pull/4172.

In the interim, disabling the operator tab in the creative menu will mitigate the crash.