Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game crash with ArrayIndexOutOfBoundsException after sorting inventory[bug][can't reproduce] #171

Closed
Hanqnero opened this issue Jun 17, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@Hanqnero
Copy link

Minecraft Verison
1.18.2

Bug
Game crash with ArrayIndexOutOfBoundsException.

То reproduce

  1. Sort inventory with these items and shulker box GUI open (not sure that second part is neccessary). After two crashes bug disappeared, never encountered it before.
  2. Bug appears

Log
crash-2022-06-17_19.23.42-client.txt

Additional context
Inventory content that caused crash:
image

@Hanqnero Hanqnero added the bug Something isn't working label Jun 17, 2022
@Hanqnero Hanqnero changed the title Game crash with ArrayIndexOutOfBoundsException after sorting inventory[bug] Game crash with ArrayIndexOutOfBoundsException after sorting inventory[bug][can't reproduce] Jun 17, 2022
@Trnrr
Copy link

Trnrr commented Jun 18, 2022

I also get this error. It's only happened to me when I have another inventory open (chest, shulker, machine GUI, etc).

Quilt: 0.17.0
mousewheelie-1.9.1+mc1.18.2

@PixelDew121
Copy link

Crashed when sorting a chest, specifically when hovering over Asurine blocks from create and using middle click to sort. Attempting to sort those blocks at a later time when the items were organized differently didn't cause issues. Unsure what specific layout of items led to the crash.

log - https://mclo.gs/huC5QL9

MC 1.18.2
MouseWheelie 1.9.1+mc1.18.2

@ripkordt
Copy link

Crashed when sorting inventory

log https://crashy.net/jgteTVZQIde6Y1z9FXF0

@Siphalor
Copy link
Owner

The reason of the bug is pretty boring: I just messed up some code during the last update.

I just want to lay out the exact cause of the crashes here, because it's pretty obscure:

When moving stacks around, and you want to move a stack with a lower count to a slot with a higher count, then you won't be able to swap them by just clicking on them.
My code actually has a workaround for that scenario and that's by picking another temporary slot that will be used to fiddle the smaller stack into place.
The issue was that that temporary slot was handled incorrectly after the update :)

This bug could only be potentially experienced when there's a lower stack count at the wrong position.
And even then it would depend on how some sorting internals would actually behave to cause the bug.

So over all a pretty simple fix for an extremely obscure bug ^^

Thanks everyone for submitting your details ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants