[MC-827] Server Crash when client logs in with invalid difficulty Created: 27/Oct/12  Updated: 07/Jul/17  Resolved: 29/Oct/12

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2
Fix Version/s: Minecraft 1.4.3

Type: Bug
Reporter: Shaun Wawro Assignee: [Mojang] Nathan Adams
Resolution: Fixed Votes: 4
Labels: crash, server
Environment:

Vanilla Minecraft Version 1.4.2 and Server 1.4.2
Windows 7 x64
Java Version 6 Update 37


Attachments: Text File crash-2012-10-26_18.03.47-server.txt     Text File crash-2012-10-26_22.04.17-server.txt    
Issue Links:
Duplicate
is duplicated by MC-2941 This happens when I join my server Resolved
Confirmation Status: Unconfirmed
Game Mode: Survival

 Description   

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.



 Comments   
Comment by Paul Merriam [ 29/Oct/12 ]

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

Comment by [Mojang] Nathan Adams [ 29/Oct/12 ]

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

Comment by Isaac Ellingson [ 29/Oct/12 ]

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.

Comment by yia vue [ 28/Oct/12 ]

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

Comment by Paul Merriam [ 27/Oct/12 ]

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.

Generated at Sun Jan 12 11:52:21 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.