Archeology Mod

Archeology Mod

116k Downloads

Disconnected from Server while attempting to use brush.

TheTennessee opened this issue ยท 13 comments

commented

In singleplayer all works fine, but when I connect to a server running the mod and attempt to do any archaeology, I got disconnected from the server. I see the block transition to a one layer lower model, and the brushing animation works, but then I just get disconnected.

On the server side, I get this error:

[17:59:50] [Server thread/WARN]: COM exception: Invalid Query: SELECT PERCENTUSAGE FROM Win32_PerfRawData_PerfOS_PagingFile
[17:59:50] [Server thread/WARN]: Failed to handle packet for /192.168.0.14:51533
net.minecraft.class_148: Ticking player
at net.minecraft.class_3222.method_14226(class_3222.java:543) ~[server-intermediary.jar:?]
at net.minecraft.class_3244.method_18784(class_3244.java:213) ~[server-intermediary.jar:?]
at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[server-intermediary.jar:?]
at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:890) ~[server-intermediary.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:324) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:684) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.RuntimeException: Config 'class net.capsey.archeology.ModConfig' has not been registered
at me.shedaniel.autoconfig.AutoConfig.getConfigHolder(AutoConfig.java:77) ~[cloth-config-6.0.45-fabric.jar:?]
at net.capsey.archeology.items.CopperBrushItem.method_7853(CopperBrushItem.java:103) ~[capsey-archeology-0.1.6-1.18.jar:?]
at net.minecraft.class_1799.method_7976(class_1799.java:532) ~[server-intermediary.jar:?]
at net.minecraft.class_1309.method_6098(class_1309.java:3041) ~[server-intermediary.jar:?]
at net.minecraft.class_1309.method_37119(class_1309.java:2956) ~[server-intermediary.jar:?]
at net.minecraft.class_3222.method_37119(class_3222.java:1645) ~[server-intermediary.jar:?]
at net.minecraft.class_1309.method_6076(class_1309.java:2946) ~[server-intermediary.jar:?]
at net.minecraft.class_1309.method_5773(class_1309.java:2312) ~[server-intermediary.jar:?]
at net.minecraft.class_1657.method_5773(class_1657.java:274) ~[server-intermediary.jar:?]
at net.minecraft.class_3222.method_14226(class_3222.java:479) ~[server-intermediary.jar:?]
... 9 more
[17:59:50] [Server thread/WARN]: Can't keep up! Is the server overloaded? Running 7178ms or 143 ticks behind

commented

So I downloaded the code base, and changed the line:

	// Adding Config
	AutoConfig.register(ModConfig.class, GsonConfigSerializer::new);

From being in the client initializer to the normal one, which fixed the above issue, but it still kicks me out of the server.

It let's me get all the way to the point the item drops out this time, and when I reconnect the item is on the ground. However, I get no error report on either the client or server side, just an immediate disconnect.

commented

I reproduced the bug, and disconnect occurs not when block finished brushed, but when you stop using the brush item. I think I found the issue (and my big design flaw), working on it

commented

Awesome. I look forward to the update!

commented

Weird. I still can't figure out what the issue is. I thought I got it, but I haven't. What I found out:

  • This does not happen in singleplayer (obviously)
  • This happens when the block breaks, not when you stop using brush item
    • This happens even if you switch item in hotbar while using or look away from the block
    • This still happens if player does not stop using item after block breaks
  • This happens if you break the block any other way (piston or 'setblock air' command)
  • This does not happen when you break a block that you haven't started brushing

Apparently, this happens because of the block breaking and not brushing itself. Worst thing is that there are no errors nor on server nor on client (as you also pointed out).

commented

I have not been heavy into minecraft modding for a long time. I don't have that much knowledge about what is going on. However, if I were to guess, it has to be some kind of rendering error. Something wrong with the server side of the code would HAVE to throw an error on the server side. If there was a rendering glitch that caused the disconnect, then it might not throw an error code. It could have just sent a bad packet.

It must have to do with how you're rendering the blocks as they are being brushed away. That's all I can think of logically. If you turn that part off and test, does it still disconnect you? If not, then I have no idea how to fix it, except maybe to change how the rendering works?

commented

Also running into this bug, with the same server side error (below)
Brushing animation works, and the moment the first layer gets removed it boots me. Logging back on does not allow me to continue the brushing.

[12:28:46] [Server thread/WARN]: Failed to handle packet for /176.63.15.222:46207
net.minecraft.class_148: Ticking player
at net.minecraft.class_3222.method_14226(class_3222.java:543) ~[server-intermediary.jar:?]
at net.minecraft.class_3244.method_18784(class_3244.java:213) ~[server-intermediary.jar:?]
at net.minecraft.class_2535.method_10754(class_2535.java:238) ~[server-intermediary.jar:?]
at net.minecraft.class_3242.method_14357(class_3242.java:183) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:890) ~[server-intermediary.jar:?]
at net.minecraft.class_3176.method_3813(class_3176.java:324) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:823) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:684) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.RuntimeException: Config 'class net.capsey.archeology.ModConfig' has not been registered
at me.shedaniel.autoconfig.AutoConfig.getConfigHolder(AutoConfig.java:77) ~[cloth-config-6.1.48-fabric.jar:?]
at net.capsey.archeology.items.CopperBrushItem.method_7853(CopperBrushItem.java:103) ~[capsey-archeology-0.1.6-1.18.jar:?]

commented

Yeah, that was the original problem. That was easy to fix. The rest of it is mind boggling.

commented

I uploaded a new update without crashing (change that @TheTennessee made), but player that starts brushing will still get disconnected after block gets broken. So now you can at least actually play, although you should reconnect after each brushing. Will try to fix this one in the next update

commented

Sounds good, and totally understandable. This one seems like it'll be a head scratcher for a while.

commented

I just did something and now in creative mode brushing works just fine, but in survival it now disconnects not when the block breaks, but immediately when you start brushing, leaving the block in broken state. Not sure what exactly I did, but seems like I'm getting closer. I think that might do something with 6cd562c and 8ba6843 (UPD: it didn't)

commented

@TheTennessee @Skeithh uploaded new version with complete fix!

commented

After trying it out on the server and all, it does seem to be fully working now. I gotta ask, what was it that caused the crash? I am seriously curious!

commented

After trying it out on the server and all, it does seem to be fully working now. I gotta ask, what was it that caused the crash? I am seriously curious! @TheTennessee

I didn't use the intended Fabric API for networking, so, how I understand, all my C2S packets were unknown to the server, and it just considered all of them a disconnect packet. And this is why there were no errors in logs - for the server there were no errors.