Pepperoni-Jabroni / MapAtlases

A vanilla-friendly mini-map & world-map mod using vanilla Maps!
GNU General Public License v3.0
24 stars 14 forks source link

[BUG] Potentially causing an exception in server Tick loop, causing a crash #80

Closed Krullin closed 1 year ago

Krullin commented 1 year ago

First off, love this mod! It's amazing.

But, regarding the issue, whenever my server has been up for a few hours and then someone logs off it crashes. It also seems to randomly crash if a player is logged on for several hours. According to the crash log it has something to do with the server Tick loop, and this mod is the only mod i recognize as potentially causing it. I am by all means not an expert and I barely know what any of this stuff means though.

Here is a copy of the error, i can send the full crash log upon request if you think it is one of my other mods that's causing a conflict:

Time: 2022-11-28 23:25:33
Description: Exception in server tick loop

java.util.ConcurrentModificationException
    at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1597)
    at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1620)
    at pepjebs.mapatlases.lifecycle.MapAtlasesServerLifecycleEvents.mapAtlasServerTick(MapAtlasesServerLifecycleEvents.java:151)
    at net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents.lambda$static$0(ServerTickEvents.java:40)
    at net.minecraft.server.MinecraftServer.handler$cbo000$onStartTick(MinecraftServer.java:6316)
    at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:819)
    at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:665)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:257)
    at java.base/java.lang.Thread.run(Thread.java:833)

If the server just restarted and a player logs off then it doesn't crash. It only happens if we've been on for a few hours or if the server has been on for a few hours.

Any help would be appreciated!

Edit: Here is a log that contains a list of all my installed mods in case it is helpful for you to see:

https://drive.google.com/file/d/1JKMh24UkoHKBu9W7khrVwC75K-BqCIda/view?usp=drivesdk

kcolyz commented 1 year ago

having same issue

Pepperoni-Jabroni commented 1 year ago

Thanks for reporting y'all! Will take a look as soon I can. I moved recently so it may be a few weeks before I get my setup ready to develop again.

Krullin commented 1 year ago

Thank you! Take all the time you need! And a slight update, it seems to happen even if the server has recently restarted. As far as I can tell it happens when players are far apart/have the atlas in their inventory or hot bar/have updated their atlas at least once after the server starts up. Don't know if that's helpful. We're still keeping it installed because we like exploring with it, it just means that once it's bedtime for one player irl it's bed time for all lol

Spotted this on my servers start up text dump, dont know if it's useful:

[WARNING] @Redirect conflict. Skipping servercore.mixins.json:optimizations.misc.MapItemSavedDataMixin from mod servercore->@Redirect::servercore$reduceInventoryIteration(Lnet/minecraft/class_1661;Lnet/minecraft/class_1799;)Z with priority 900, already redirected by mapatlases.mixins.json:MapStateTrinketsMixin from mod map_atlases->@Redirect::containsProxy(Lnet/minecraft/class_1661;Lnet/minecraft/class_1799;)Z with priority 1100

[WARNING] @Redirect conflict. Skipping servercore.mixins.json:optimizations.misc.MapItemSavedDataMixin from mod servercore->@Redirect::servercore$reduceInventoryIteration(Lnet/minecraft/class_1661;Lnet/minecraft/class_1799;)Z with priority 900, already redirected by mapatlases.mixins.json:MapStateTrinketsMixin from mod map_atlases->@Redirect::containsProxy(Lnet/minecraft/class_1661;Lnet/minecraft/class_1799;)Z with priority 1100