mojira.dev

LCLP

Assigned

No issues.

Comments

Also here is another crash report that was generated, where you can see the server thread exception:

[media]

Hi,

sorry, for some reason the log file doesn’t seem to have uploaded the first time.
Here you go:

[media]

A few additional details for developers:

The crash happens because of a race-condition in the view distance manager. I’ve initially encountered it on an old thinkpad, with a slower CPU…
It only seems to happen if no player data exists for the joining player; just after accepting the code of conduct of the server.

This happens on the stock vanilla 26.3 server, without any mods / modloaders etc.

It’s pretty hard to replicate on my machine with a more powerful CPU (Intel i5 13600 KF).
However, I was able to reproduce it using a custom datapack keeping the chunk loader busy and a python script sending join packets repeatedly.

I’ve updated the GitHub Gist so others can easily reproduce this using docker.

As I said already, the fix is simply adding one line to the code of conduct packet handler in ServerConfigurationPacketListenerImpl:

	@Override
	public void handleAcceptCodeOfConduct(final ServerboundAcceptCodeOfConductPacket packet) {
	    // this line here is missing in the vanilla game
		PacketUtils.ensureRunningOnSameThread(packet, this, this.server.packetProcessor());
	
		this.finishCurrentTask(ServerCodeOfConductConfigurationTask.TYPE);
	}

I needed to fix this problem on my thinkpad server, so I installed the Fabric mod loader and added this missing line via a Mixin.
Since then, I’ve never encountered the crash again…

[media]
[media]
[media]
[media]