Dedicated Server issue - Connecting client dumped by Divide by Zero error.
Closed this issue ยท 27 comments
So it seems to work fine in a standard single player game, even tho I haven't found any spells to really test it yet. However, on a dedicated server session (locally ran in a separate process) it loads up fine on the server but when I join it, it drops me with a somewhat cryptic and very bad "/ by zero" error. Nothing really pointed to any specific mod but I remove this from the server's mod list, everything is fine.
[16:56:39] [Server thread/INFO]: lostsoul3471 joined the game
[16:56:40] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:61510
net.minecraft.class_148: Ticking player
at net.minecraft.class_3222.method_14226(class_3222.java:530) ~[intermediary-server.jar:?]
at net.minecraft.class_3244.method_18784(class_3244.java:212) ~[intermediary-server.jar:?]
at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[intermediary-server.jar:?]
at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:902) ~[intermediary-server.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:335) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.ArithmeticException: / by zero
at net.minecraft.class_1657.handler$zbk001$tick(class_1657.java:2414) ~[intermediary-server.jar:?]
at net.minecraft.class_1657.method_5773(class_1657.java:323) ~[intermediary-server.jar:?]
at net.minecraft.class_3222.method_14226(class_3222.java:466) ~[intermediary-server.jar:?]
... 9 more
[16:56:40] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:61510
net.minecraft.class_148: Ticking player
at net.minecraft.class_3222.method_14226(class_3222.java:530) ~[intermediary-server.jar:?]
at net.minecraft.class_3244.method_18784(class_3244.java:212) ~[intermediary-server.jar:?]
at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[intermediary-server.jar:?]
at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:902) ~[intermediary-server.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:335) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-server.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?]
at java.lang.Thread.run(Unknown Source) [?:?]
**Caused by: java.lang.ArithmeticException: / by zero**
at net.minecraft.class_1657.handler$zbk001$tick(class_1657.java:2414) ~[intermediary-server.jar:?]
at net.minecraft.class_1657.method_5773(class_1657.java:323) ~[intermediary-server.jar:?]
at net.minecraft.class_3222.method_14226(class_3222.java:466) ~[intermediary-server.jar:?]
... 9 more
[16:56:40] [Server thread/INFO]: lostsoul3471 lost connection: Internal server error
[16:56:40] [Server thread/INFO]: lostsoul3471 left the game
[16:56:40] [Server thread/INFO]: Disconnecting client lostsoul3471
Yea no there isn't a single place that I'm dividing by in the player mixin that isn't a constant
Can confirm that i'm having the same issue with the same error when running on a dedicated server, removing Arcanus stops the error from happening...
Can either of you share a mod list, as well as test with just Arcanus on your server?
Also, can I recommend you add mixin trace to your mod list? It'll let me know which mods are showing up in that specific stacktrace.
There's gotta be something you guys are doing differently than me, or it's another mod at fault (if I had to guess, doing something wrong with their mixin, or using an overwrite) and Arcanus just happens to be making use of something they fucked up, because it's not happening on the server I have set up with just Arcanus and the mods it has compat with/relies on.
Yeah, it's definitely mod compat. Works fine on its own...
My mods list is huge, but I can get one in a second.
I recommend using Mixin Trace first. It'll pinpoint the potential mods at fault
Alright, i'll run minecraft and a dedicated server and get back with the results.
Thanks. This is one of my biggest issues with mixin, you never know who's at fault half the time.
net.minecraft.class_148: Ticking player at net.minecraft.class_3222.method_14226(class_3222.java:530) ~[intermediary-server.jar:?] at net.minecraft.class_3244.method_18784(class_3244.java:212) ~[intermediary-server.jar:?] at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[intermediary-server.jar:?] at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:902) ~[intermediary-server.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:335) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.handler$cfd000$modifiedRunLoop(MinecraftServer.java:8890) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:676) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?] at java.lang.Thread.run(Thread.java:831) [?:?] Caused by: java.lang.ArithmeticException: / by zero at net.minecraft.class_1657.handler$zzp001$tick(class_1657.java:2414) ~[intermediary-server.jar:?] at net.minecraft.class_1657.method_5773(class_1657.java:323) ~[intermediary-server.jar:?] at net.minecraft.class_3222.method_14226(class_3222.java:466) ~[intermediary-server.jar:?] ... 10 more
There's no mixin traces in the log with the mod installed, since the server doesn't technically crash.
That's a terrible code insert... Basically it's just the same error as the one at the start of the thread
Alright, time for the unfun part. You need to disable half your mods, and leave the other half enabled. If the issue persists, halve the number of those until you find the mod that's causing the problem. If the error stops, swap the half you have enabled with the last half you disabled.
So it seems to work fine in a standard single player game, even tho I haven't found any spells to really test it yet. However, on a dedicated server session (locally ran in a separate process) it loads up fine on the server but when I join it, it drops me with a somewhat cryptic and very bad "/ by zero" error. Nothing really pointed to any specific mod but I remove this from the server's mod list, everything is fine.
[16:56:39] [Server thread/INFO]: lostsoul3471 joined the game [16:56:40] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:61510 net.minecraft.class_148: Ticking player at net.minecraft.class_3222.method_14226(class_3222.java:530) ~[intermediary-server.jar:?] at net.minecraft.class_3244.method_18784(class_3244.java:212) ~[intermediary-server.jar:?] at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[intermediary-server.jar:?] at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:902) ~[intermediary-server.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:335) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?] at java.lang.Thread.run(Unknown Source) [?:?] Caused by: java.lang.ArithmeticException: / by zero at net.minecraft.class_1657.handler$zbk001$tick(class_1657.java:2414) ~[intermediary-server.jar:?] at net.minecraft.class_1657.method_5773(class_1657.java:323) ~[intermediary-server.jar:?] at net.minecraft.class_3222.method_14226(class_3222.java:466) ~[intermediary-server.jar:?] ... 9 more [16:56:40] [Server thread/WARN]: Failed to handle packet for /127.0.0.1:61510 net.minecraft.class_148: Ticking player at net.minecraft.class_3222.method_14226(class_3222.java:530) ~[intermediary-server.jar:?] at net.minecraft.class_3244.method_18784(class_3244.java:212) ~[intermediary-server.jar:?] at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[intermediary-server.jar:?] at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:902) ~[intermediary-server.jar:?] at net.minecraft.class_3176.method_3813(class_3176.java:335) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:831) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:697) ~[intermediary-server.jar:?] at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-server.jar:?] at java.lang.Thread.run(Unknown Source) [?:?] **Caused by: java.lang.ArithmeticException: / by zero** at net.minecraft.class_1657.handler$zbk001$tick(class_1657.java:2414) ~[intermediary-server.jar:?] at net.minecraft.class_1657.method_5773(class_1657.java:323) ~[intermediary-server.jar:?] at net.minecraft.class_3222.method_14226(class_3222.java:466) ~[intermediary-server.jar:?] ... 9 more [16:56:40] [Server thread/INFO]: lostsoul3471 lost connection: Internal server error [16:56:40] [Server thread/INFO]: lostsoul3471 left the game [16:56:40] [Server thread/INFO]: Disconnecting client lostsoul3471
Can you send your mod list first? It'd be easier if we could at least see what mods we have in common to make the list a bit smaller.
So I was just suggested to suggest you attempt to do a mixin export, and see what you get
https://fabricmc.net/wiki/tutorial:mixin_export
Tried dumping the mixins audit but it failed. (edit: wrong place in the JVM launcher got a bunch of stuff now, any particular file?)
Here's the current mod list sans Arcanus.
Soooo... created a new map on the server and slowly added mods to see which one breaks it--surprised to see, none of them did. The whole list that I have above worked fine. I can only assume that it could be an issue in adding this mod to an existing world but it's fine if it's there at world gen.
Tried dumping the mixins audit but it failed. (edit: wrong place in the JVM launcher got a bunch of stuff now, any particular file?)
Here's the current mod list sans Arcanus.
Soooo... created a new map on the server and slowly added mods to see which one breaks it--surprised to see, none of them did. The whole list that I have above worked fine. I can only assume that it could be an issue in adding this mod to an existing world but it's fine if it's there at world gen.
We share the following mods:
Adorn
Architectury
BCLib
BetterEnd+Nether
Cloth-Config
Comforts
Emotecraft
Kotlin
Graves (Assuming it's Universal Graves)
Lithium
MoStructures
Player Roles
REI (Although not installed serverside)
VoiceChat
Xaeros Worldmap (Minimap is not serverside)
Alright that brings down the number of mods substantially. I'll see if I can get it to happen with a world made without Arcanus initially.
Tried dumping the mixins audit but it failed. (edit: wrong place in the JVM launcher got a bunch of stuff now, any particular file?)
Here's the current mod list sans Arcanus.
modlist.txt
Soooo... created a new map on the server and slowly added mods to see which one breaks it--surprised to see, none of them did. The whole list that I have above worked fine. I can only assume that it could be an issue in adding this mod to an existing world but it's fine if it's there at world gen.We share the following mods:
Adorn
Architectury
BCLib
BetterEnd+Nether
Cloth-Config
Comforts
Emotecraft
Kotlin
Graves (Assuming it's Universal Graves)
Lithium
MoStructures
Player Roles
REI (Although not installed serverside)
VoiceChat
Xaeros Worldmap (Minimap is not serverside)
Update: it is 100% one of those mods. I managed to reproduce the error with all the given information, so now I'm working on whittling it down.
Update 2: @Alkiasan when you tested Arcanus on its own, did you create a new world? 'Cause I went through every single mod after making a new world without Arcanus, and then adding Arcanus in, until I was left with nothing except Arcanus and its required dependencies, but the issue still persisted.
Doesn't really matter though, because that means the issue is on my end after all, and it probably is a serialisation problem.
It was a existing world... Playerdata might have already been corrupted or something, since the server had been having issues with playerdata before.
Let me try on a fresh world with a fresh server install and just Arcanus
Well I think I've figured out the problem anyways, and it's because me, being an idiot, forgot modulo does division, and therefore I am dividing by 0 when Arcanus is added to a world with pre-existing player data.
Okay so the fix does work, however you will need to kill yourself in order to get the player data set back to the default values for Arcanus, since now the game thinks it should be 0. Fix will be up on Modrinth in a few minutes