IllegalStateException
OoLunar opened this issue ยท 5 comments
Had the same issue appear with items in Sophisticated Backpacks today. I pulled everything out of the backpack and put it back in, and still had the same error. Relogged, same error. Was trying to narrow it down and it simply stopped giving the error again and I don't know why.
@aelfwyne my guess is your backpack is augmented with increased stack size.
If so IPN can't support these since the game cleims one stack size and the back pack allows another.
Having the stack size increased also breaks the assumption that you can pickup the whole stack with one click
This could happen if between the moment you press R and the moment the real sorting clicks are executed there was a change in the inventory. The exception has 2 purposes:
- to prevent eventual discrepancy between server and the client due to insufficient information when we execute the clicks.
- to catch bugs in development for example the if the sorting algorithms produced inventory that had different item counts then.
If you got the exception as one off I guess there was a change in the inventory during that very small window.
On the other hand if you get this fairly often I'll need more information:
- other mods installed
- single or multi player
- if multiplayer what kind of server software is the server running (if known)
- in mod settings enable debug (it's located at the bottom) then restart the game and there will be new category "debugs" in the mod settings there you need to enable trace logs
- full log with debug enabled and the exception present (more then 1 time if possible)
- This is a one off event
- Single player
- Modded, but none of them touch the inventory menu
I'll start playing with debug mode enabled. Thank you for the tips!
Oops! I missed the stack trace. Here ya go:
[19:51:43] [Render thread/INFO]: [STDERR]: java.lang.IllegalStateException: Unequal before and after item counts
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.sandbox.ItemPlanner.tracker(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.AdvancedContainer.tracker(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.AdvancedContainer$Companion.tracker(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.AdvancedContainer$Companion.tracker$default(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.InnerActions.innerDoSort(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.InnerActions.doSort(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.GeneralInventoryActions.doSort(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.inventory.GeneralInventoryActions.doSort(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.gui.inject.SortingButtonCollectionWidget$InitWidgets$sortButton$1.invoke(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.gui.inject.SortingButtonCollectionWidget$InitWidgets$sortButton$1.invoke(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.ButtonWidget$2.invoke(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.ButtonWidget$2.invoke(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.ButtonWidget.onClick(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.ButtonWidget.mouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.IWidgetEventTarget$DefaultImpls.mouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.IWidget$DefaultImpls.mouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.gui.widgets.Widget.mouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.ipnext.gui.inject.InsertWidgetHandler.mouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.input.GlobalScreenEventListener.onMouseClicked(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.anti_ad.mc.common.input.GlobalScreenEventListener.onMouse(Unknown Source)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_312.handler$bhe000$onScreenMouseButton(class_312.java)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_312.method_1601(class_312.java:94)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_312.method_22686(class_312.java:165)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_1255.execute(class_1255.java:101)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_312.method_22684(class_312.java:165)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.lwjgl.system.JNI.invokeV(Native Method)
[19:51:43] [Render thread/INFO]: [STDERR]: at org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3101)
[19:51:43] [Render thread/INFO]: [STDERR]: at com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:165)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_1041.method_15998(class_1041.java:310)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_310.method_1523(class_310.java:1137)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.class_310.method_1514(class_310.java:728)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.minecraft.client.main.Main.main(Main.java:217)
[19:51:43] [Render thread/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[19:51:43] [Render thread/INFO]: [STDERR]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
[19:51:43] [Render thread/INFO]: [STDERR]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[19:51:43] [Render thread/INFO]: [STDERR]: at java.base/java.lang.reflect.Method.invoke(Method.java:567)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.fabricmc.loader.game.MinecraftGameProvider.launch(MinecraftGameProvider.java:234)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.fabricmc.loader.launch.knot.Knot.launch(Knot.java:153)
[19:51:43] [Render thread/INFO]: [STDERR]: at net.fabricmc.loader.launch.knot.KnotClient.main(KnotClient.java:28)
[19:51:43] [Render thread/INFO]: [CHAT] java.lang.IllegalStateException: Unequal before and after item counts