mojira.dev
MC-68124

Game crashes with superflat preset is above 256: java.lang.ArrayIndexOutOfBoundsException: 256

The bug

If the player makes a preset for superflat that goes over the build limit, the game hangs on the loading screen.

Example preset:

minecraft:bedrock,255*minecraft:dirt,minecraft:grass;1;

Crash report

1.13.1\: [^crash-2018-08-26_12.24.23-client.txt]

Description: mouseClicked event handler

java.lang.ArrayIndexOutOfBoundsException: 256
	at buc.w(SourceFile:205)
	at buc.b(SourceFile:383)
	at cjl.a(SourceFile:70)
	at cjz$1.a(SourceFile:170)
	at cgt.mouseClicked(SourceFile:103)
	at chp.mouseClicked(SourceFile:46)
	at cfu.b(SourceFile:83)
	at cfu$$Lambda$1007/1799068185.run(Unknown Source)
	at ckc.a(SourceFile:430)
	at cfu.a(SourceFile:83)
	at cfu$$Lambda$839/270276013.invoke(Unknown Source)
	at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:36)
	at org.lwjgl.system.JNI.invokeV(Native Method)
	at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3108)
	at cgc.a(SourceFile:321)
	at cfs.c(SourceFile:875)
	at cfs.a(SourceFile:395)
	at net.minecraft.client.main.Main.main(SourceFile:144)

Linked issues

Attachments

Comments

StevenNL2000

Well, Minecraft's maximum build height is 256, so when the game tries to place blocks above that, it crashes. Also, please don't give us the output of the console, but give us the crash report from
C:\Users\Logan\AppData\Roaming\.minecraft\crash-reports\crash-2014-08-18_17.17.46-server.txt
instead (the link to the crash report is always in the output). But I agree that Minecraft should not allow you to do this, instead of crashing.

marcono1234

Confirmed for

  • Minecraft 1.8-pre 1

  • Minecraft 1.8.1-pre3

marcono1234

Confirmed for

  • 15w37a

    Example preset

    3;minecraft:bedrock,255*minecraft:dirt,minecraft:grass;1;

Error

[15:43:46] [Server thread/INFO]: Starting integrated minecraft server version 15w37a
[15:43:46] [Server thread/INFO]: Generating keypair
[15:43:47] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.ArrayIndexOutOfBoundsException: 256
	at asc.<init>(SourceFile:101) ~[15w37a.jar:?]
	at arq.c(SourceFile:68) ~[15w37a.jar:?]
	at lk.m(SourceFile:695) ~[15w37a.jar:?]
	at lk.<init>(SourceFile:138) ~[15w37a.jar:?]
	at bvm.a(SourceFile:98) ~[15w37a.jar:?]
	at bvm.j(SourceFile:130) ~[15w37a.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:420) [15w37a.jar:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
[15:43:47] [Server thread/ERROR]: This crash report has been saved to: ###\crash-reports\crash-2015-09-11_15.43.47-server.txt
[15:43:47] [Server thread/INFO]: Stopping server
[15:43:47] [Server thread/INFO]: Saving players
[15:43:47] [Server thread/INFO]: Saving worlds
[15:43:47] [Server thread/ERROR]: Exception stopping the server
java.lang.NullPointerException
	at net.minecraft.server.MinecraftServer.u(SourceFile:393) ~[15w37a.jar:?]
	at bvm.u(SourceFile:323) ~[15w37a.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:483) [15w37a.jar:?]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]

Server crash

---- Minecraft Crash Report ----
// Would you like a cupcake?

Time: 11.09.15 15:43
Description: Exception in server tick loop

java.lang.ArrayIndexOutOfBoundsException: 256
	at asc.<init>(SourceFile:101)
	at arq.c(SourceFile:68)
	at lk.m(SourceFile:695)
	at lk.<init>(SourceFile:138)
	at bvm.a(SourceFile:98)
	at bvm.j(SourceFile:130)
	at net.minecraft.server.MinecraftServer.run(SourceFile:420)
	at java.lang.Thread.run(Thread.java:745)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 15w37a
	Operating System: Windows 7 (amd64) version 6.1
	Java Version: 1.8.0_25, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 583688080 bytes (556 MB) / 786272256 bytes (749 MB) up to 1060372480 bytes (1011 MB)
	JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
	IntCache: cache: 1, tcache: 1, allocated: 12, tallocated: 94
	Profiler Position: N/A (disabled)
	Player Count: 0 / 8; []
	Type: Integrated Server (map_client.txt)
	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.
Pierrot Charles

affect 1.13 release

wobst.michael

Can no longer reproduce in 19w38b. Someone else please check. Didn't test it with 1.14.4.

boq

Fixed in 1.14.4-pre1

pokechu22

Confirmed fixed; the blocks above it will have their count set to 0 (which makes sense and doesn't lose information)

pie595

boq

Confirmed

Crash

Minecraft 1.7.10, Minecraft 1.8-pre1, Minecraft 1.8.1-pre3, Minecraft 15w37a, Minecraft 16w32b, ..., Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2

Minecraft 1.14.4 Pre-Release 1

Retrieved