MarkusBordihn / BOs-Easy-NPC

Create easily NPC for your world or for your mod.
Other
19 stars 7 forks source link

[Crash Report] Crash on trying to edit trade menu 1.19.2 Fabric Server #255

Closed Onewingseraphim closed 2 months ago

Onewingseraphim commented 2 months ago

Minecraft and Mod version 🐞 1.19.2 fabric 5.2.0 and 5.1.1 This is only happening Server Side for some reason works fine in singleplayer I'm suspecting maybe some sort of networking mod? Idk

Description of the crash 💥 Made an NPC clicked on the trades button and clicked over into the basic or advanced tab, get kicked from server

Expected behavior before the crash ✔️ I expect to be able to edit my trades 😅

Logs 📝 logs.txt

Additional context 📋 Here's a couple of lines of the log I noticed where the error starts not sure what it means tbh

[Netty Server IO #16/ERROR] (ServerPlayNetworkAddon for Onewingseraphim) Encountered exception while handling in channel with name "easy_npc:open_menu_message" java.util.ConcurrentModificationException: null

and (I'm redacting my IP here for obvious reasons)

[Netty Server IO #16/INFO] (Minecraft) [STDERR]: /xxx.xxx.xxx.xxx:57688 PLAY java.util.ConcurrentModificationException [Netty Server IO #16/ERROR] (Minecraft) Exception occurred in netty pipeline java.util.ConcurrentModificationException: null

EDIT-- Actually it did end up crashing on my single player world after I played around with the trades for a few minutes and then all of a sudden it crashed trying to edit them, almost seems like I make a new NPC can set trades ONE TIME only and if I try to edit them again after the game will crash.

MarkusBordihn commented 2 months ago

Thanks for the report. Unfortunately I was not really able to reproduce the issue on my side.

image

Relevant log:

[21:26:22] [Netty Server IO #16/ERROR] (Minecraft) Exception occurred in netty pipeline
java.util.ConcurrentModificationException: null
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1597) ~[?:?]
    at java.util.HashMap$KeyIterator.next(HashMap.java:1620) ~[?:?]
    at net.minecraft.class_4558.method_22510(class_4558.java:60) ~[server-intermediary.jar:?]
    at net.minecraft.class_2066.method_24362(class_2066.java:55) ~[server-intermediary.jar:?]
    at net.minecraft.class_2066.method_8950(class_2066.java:51) ~[server-intermediary.jar:?]
    at net.minecraft.class_3222$2.method_7635(class_3222.java:244) ~[server-intermediary.jar:?]
    at net.minecraft.class_1703.method_34246(class_1703.java:218) ~[server-intermediary.jar:?]
    at net.minecraft.class_1703.method_7623(class_1703.java:175) ~[server-intermediary.jar:?]
    at net.minecraft.class_1703.method_7596(class_1703.java:138) ~[server-intermediary.jar:?]
    at net.minecraft.class_3222.method_14235(class_3222.java:409) ~[server-intermediary.jar:?]
    at net.minecraft.class_3222.method_17355(class_3222.java:1048) ~[server-intermediary.jar:?]
    at de.markusbordihn.easynpc.menu.MenuManager.openMenu(MenuManager.java:68) ~[easy_npc-fabric-1.19.2-5.2.0.jar:?]
    at de.markusbordihn.easynpc.network.message.server.OpenMenuMessage.handleServer(OpenMenuMessage.java:57) ~[easy_npc-fabric-1.19.2-5.2.0.jar:?]
    at de.markusbordihn.easynpc.network.NetworkHandler.lambda$registerServerNetworkMessageHandler$1(NetworkHandler.java:86) ~[easy_npc-fabric-1.19.2-5.2.0.jar:?]

However I uploaded a new beta version 5.2.2 with additional error checks and logging. Please let me know if you still see any issue here.

The corresponding part within the log is a standard vanilla function, see: https://github.com/MarkusBordihn/BOs-Easy-NPC/blob/0b8296cb5130c00e9fb78565502134d0c540cd7e/Common/src/main/java/de/markusbordihn/easynpc/menu/MenuManager.java#L68

Which means when this fails it's mostly an issue with some additional mods which try to optimize the network traffic and/or the standard screens.

Onewingseraphim commented 2 months ago

Thanks for the timely response! So AFAIK I have disabled all network/screen modifying mods (of course I may have missed some or the 1 problem causing one) and I'm still having issues. All these tests this time have been on Singleplayer only, I disabled most of these mods 1 at a time to see if it would fix but no luck so far. At the moment the game doesn't fully crash now and instead boots me back to the main menu screen with the error java.util.ConcurrentModificationException on the screen.

I have 600+ mods so of course it would be difficult for me to figure out which one is causing the error lol but I will keep trying to look unless you happen to find the issue.

*After disabling ModernFix the game stopped crashing but boots me to the main menu

Latest Log: https://mclo.gs/eUcqSzT

Here are the mods I've disabled so far image

MarkusBordihn commented 2 months ago

Thanks for the feedback. Unfortunately the error is still the same and I tried to backtrack the error. But it's seems very weird and is not caused by the easy npc mod itself.

Encountered exception while handling in channel with name "easy_npc:open_menu_message"
--
11206 | java.util.ConcurrentModificationException: null
11207 | at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1013) ~[?:?]
11208 | at java.util.ArrayList$ListItr.previous(ArrayList.java:1040) ~[?:?]
11209 | at com.google.common.collect.Lists$ReverseList$1.next(Lists.java:931) ~[guava-31.0.1-jre.jar:?]
11210 | at java.lang.Iterable.forEach(Iterable.java:74) ~[?:?]
11211 | at net.minecraft.server.function.CommandFunctionManager$Execution.run(class_2991.java:187) ~[client-intermediary.jar:?]
11212 | at net.minecraft.server.function.CommandFunctionManager.execute(CommandFunctionManager.java:85) ~[client-intermediary.jar:?]
11213 | at net.minecraft.server.function.CommandFunctionManager.execute(CommandFunctionManager.java:69) ~[client-intermediary.jar:?]
11214 | at net.minecraft.advancement.AdvancementRewards.method_17978(AdvancementRewards.java:77) ~[client-intermediary.jar:?]
11215 | at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
11216 | at net.minecraft.advancement.AdvancementRewards.apply(AdvancementRewards.java:77) ~[client-intermediary.jar:?]
11217 | at net.minecraft.advancement.PlayerAdvancementTracker.grantCriterion(PlayerAdvancementTracker.java:205) ~[client-intermediary.jar:?]
11218 | at net.minecraft.advancement.criterion.Criterion$ConditionsContainer.grant(class_179.java:35) ~[client-intermediary.jar:?]
11219 | at net.minecraft.advancement.criterion.AbstractCriterion.trigger(AbstractCriterion.java:74) ~[client-intermediary.jar:?]
11220 | at net.minecraft.advancement.criterion.InventoryChangedCriterion.trigger(InventoryChangedCriterion.java:55) ~[client-intermediary.jar:?]
11221 | at net.minecraft.advancement.criterion.InventoryChangedCriterion.trigger(InventoryChangedCriterion.java:51) ~[client-intermediary.jar:?]
11222 | at net.minecraft.server.network.ServerPlayerEntity$2.onSlotUpdate(class_3222.java:244) ~[client-intermediary.jar:?]
11223 | at net.minecraft.screen.ScreenHandler.updateTrackedSlot(ScreenHandler.java:218) ~[client-intermediary.jar:?]
11224 | at net.minecraft.screen.ScreenHandler.sendContentUpdates(ScreenHandler.java:175) ~[client-intermediary.jar:?]
11225 | at net.minecraft.screen.ScreenHandler.addListener(ScreenHandler.java:138) ~[client-intermediary.jar:?]
11226 | at net.minecraft.server.network.ServerPlayerEntity.onScreenHandlerOpened(ServerPlayerEntity.java:409) ~[client-intermediary.jar:?]
11227 | at net.minecraft.server.network.ServerPlayerEntity.openHandledScreen(ServerPlayerEntity.java:1048) ~[client-intermediary.jar:?]
11228 | at de.markusbordihn.easynpc.menu.MenuManager.openMenu(MenuManager.java:79) ~[easy_npc-fabric-1.19.2-5.2.2.jar:?]
11229 | at de.markusbordihn.easynpc.network.message.server.OpenMenuMessage.handleServer(OpenMenuMessage.java:52) ~[easy_npc-fabric-1.19.2-5.2.2.jar:?]
11230 | at de.markusbordihn.easynpc.network.NetworkHandler.lambda$registerServerNetworkMessageHandler$1(NetworkHandler.java:86) ~[easy_npc-fabric-1.19.2-

According this log the following happens:

Could you please confirm the following:

Because the issue is not directly related to the mod, and other screens seems to working fine it seems a very specific issue. :(

Onewingseraphim commented 2 months ago

Sorry for all the trouble if it's too much and just because I'm too optimistic with all my mods then feel free to tell me to figure it out on my own 😂 I could eventually probably find the troublesome mod but thought maybe you could help guide me to finding it easier.

I've tried a couple of different NPCs and tried making new ones and would cause the same issue, I am using Numismatic Overhaul which adds currency items to the game so maybe thats something when you mention fancy items?

What's really strange is it doesn't always happen immediately it'll work the first time but if I open it again shortly after it'll crash I recorded what happens on my end in this video, (it loads really slow in the video cause of OBS) so just skip ahead a minute or two if you want.

https://www.youtube.com/watch?v=biwu3aV2Vkw

The modpack is private for me and my friends for now but you're welcome to try it out if you'd like, the pack would have those other mods still enabled though that I mentioned previously that I disabled. I know Sprint O' Meter was reading errors but only AFTER the errors I previously sent you so I don't think that mod is an issue but I disabled it anyway. All the mods are only from Modrinth and Curseforge. (it's a .mrpack file for modrinth)

[Retracted]

MarkusBordihn commented 2 months ago

Thanks for the feedback. I'll try to reproduce the issue with the shared mods.

It's important to me that this mod works as seamlessly as possible with other mods, so I'll do my best to identify the problem. However, I can't fix issues that are caused by other mods or their implementations.

Onewingseraphim commented 2 months ago

I completely understand hopefully it's a easy find for you, it's probably just some silly stupid mod somewhere in my giant list of mods causing the problem I've been thinking about downsizing anyway just have to take the time to figure out what to keep and what to remove but I was definitely excited for this mod as I really enjoy RPG aspects in Minecraft. Anyway thanks for the help please take your time with it hopefully you can figure out easily, but absolutely no rush to get it figured out as it's a very obviously isolated incident on my end.

MarkusBordihn commented 2 months ago

I removed some mods for testing purposes and to reduce loading times.

image

The mod pack runs fine with the following mods, so you can exclude them as potential causes of the issue: https://gist.github.com/MarkusBordihn/6308772d8b0f382af60e8677d2ef4bff

I recommend comparing this list with your complete mod list. Deactivate any mods not on this list, or delete them if they are no longer needed or have overlapping or similar functionalities.

I couldn't isolate the issue to a specific mod, but this should provide a good starting point. This is all I could do from my side, as it appears to be a mod incompatibility issue, likely due to a mixin implementation within container slots, which is difficult to debug in such a large mod pack.

Hope this helps to isolate the issue.

Onewingseraphim commented 2 months ago

Okay thank you I really appreciate the help I'll take a look at the list and see what I can do with it, I'll let you know if I find the culprit or if any other issues arise.

Onewingseraphim commented 2 months ago

I'm in the process of recreating the modpack few mods at a time to see if I can find the culprit, I'm up to 153 mods including EMI ,Numismatic Overhaul, several other mods and Easy NPC are working perfectly fine together, I'll keep adding and testing as I was planning on recreating the pack anyway due to lag issues and I'll let you know which mod it is.

Onewingseraphim commented 2 months ago

Well I said that but tbh I'm pretty sure I readded every single mod and it works fine now? Idk how that's even possible but somehow it's work just fine with even more mods than before lol, well idk I'm completely stumped at what's going on now but I appreciate all the help so far maybe it's some weird corruption with that profile in modrinth as I just made a new fresh profile and started re-adding the mods handfuls at a time to try and figure out the issue but now it just works somehow.