[Crash]: 1.18.2 Clicking an item in a Curios slot crashes the game
Lykrast opened this issue ยท 5 comments
Steps to Reproduce the Crash
Equip an item in a Curios slot, open the Curios inventory, then click on the item.
- Minecraft 1.18.2
- Forge 40.0.12
- JEI 1.18.2-9.5.0.132
- Curios forge-1.18.2-5.0.6.3
- For curios mods got it to happen with both Meet Your Fight 1.18.2-1.2.3 and Artifacts 1.18.2-4.0.5
Mod Pack URL (Optional)
No response
Mod Pack Version (Optional)
No response
Extra Notes (Optional)
Might be Curios's fault, but since the stacktrace is from JEI that seemed like the most natural place to report it first, at least to find what it's doing wrong if it's its fault.
Crash Report
https://gist.github.com/Lykrast/b09071ea9a7252f893450805423854b5
I get the same, it happens when a slot is positioned with either a negative x or y coordinate in a ContainerMenu GUI.
addSlot(new GenericSlot(handler, 0, -5, -8));
This appears to be an issue with the GuiContainerWrapper.java
, particularly the ImmutableRect2I
which force checks all int values to be greater than or equal to 0, (see ImmutableRect2i.java
lines 27-30), which causes the crash to desktop for any mod that has a slot with a negative: x, y, width, or height, or even in vanilla if any vanilla container has a slot with negative coordinates.
Experiencing a similar crash with angel ring 1.18-1.5.0, Packed up 1.0.25mc1.18, And Beyond earth1.18.2-6.0j, and beyond earth:Giselle Addon1.18.2-2.2. able to remove angel ring from curio slot, until JEI 1.18.2-9.5.2.133 was added to pack, issue also occurred with a previous version
crash-2022-03-15_17.03.41-client.txt
error message mentions "The game crashed whilst mouseclicked event handler Error java.lang.IllegalArgumentException: x must be greater or equal 0 Exit code -1"
Part 2, issue does not occur when JEI is removed and REI is installed, curio slots are able to be added from and taken from again, REI used for testing purposes