mojira.dev
MC-827

Server Crash when client logs in with invalid difficulty

The server (privately hosted on my PC and have had no issues in previous versions) crashes within seconds upon any user logging into it without fail since the 1.4.2 version of the client and server have been updated.

This happens in a brand new world/seed and in our existing seeds/worlds from previous versions.

Server log generates the following:

SEVERE] Encountered an unexpected exception ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException: 4
	at qa.bD(SourceFile:261)
	at xr.a(SourceFile:162)
	at xr.a(SourceFile:139)
	at ie.b(SourceFile:106)
	at net.minecraft.server.MinecraftServer.r(SourceFile:717)
	at hg.r(SourceFile:233)
	at net.minecraft.server.MinecraftServer.q(SourceFile:661)
	at net.minecraft.server.MinecraftServer.run(SourceFile:595)
	at fp.run(SourceFile:818)
[SEVERE] This crash report has been saved to: D:\Minecraft\1.4.2 Server\.\crash-reports\crash-2012-10-26_18.03.47-server.txt

See attached crash report for further information. Apologies if this is a repeat issue, I did briefly scan the other issue titles.

Linked issues

Attachments

Comments 5

I'm seeing the same issue on our private ubuntu server.
Unmodded MC 1.4.2.Server runs fine until a user connects. As soon as user connects, server crashes. Crash report attached.

Seems to happen when I changed to difficulty 4 on server settings. On Linux and Windows.

I wonder if this is related to [MC-984]? Our users are kicked off with bad packets the instant they login, or negative key lengths, or a number of other problems, and nothing is modded. I hope they fix this, it's frustrating.

This is fixed in the next version, however the issue stems from having an invalid difficulty. Don't do that. 😃

👍 Confirmed - my error. Typo on the difficulty line. 22 where I wanted to type 2. Thank you!

Shaun Wawro

Nathan Adams

Unconfirmed

crash, server

Minecraft 1.4.2

Minecraft 1.4.3

Retrieved