mojira.dev
MC-80036

Crash when generating world with certain custom preset

Minecraft hangs and even uses nearly no CPU after some time while creating or loading a customized world with the following preset code. My PC is definitely strong enough.

{"coordinateScale":684.412,"heightScale":684.412,"lowerLimitScale":512.0,"upperLimitScale":512.0,"depthNoiseScaleX":200.0,"depthNoiseScaleZ":200.0,"depthNoiseScaleExponent":0.5,"mainNoiseScaleX":80.0,"mainNoiseScaleY":160.0,"mainNoiseScaleZ":80.0,"baseSize":8.5,"stretchY":12.0,"biomeDepthWeight":1.0,"biomeDepthOffset":0.0,"biomeScaleWeight":1.0,"biomeScaleOffset":0.0,"seaLevel":1,"useCaves":true,"useDungeons":true,"dungeonChance":100,"useStrongholds":true,"useVillages":false,"useMineShafts":true,"useTemples":true,"useMonuments":true,"useRavines":true,"useWaterLakes":true,"waterLakeChance":100,"useLavaLakes":true,"lavaLakeChance":100,"useLavaOceans":false,"fixedBiome":-1,"biomeSize":8,"riverSize":1,"dirtSize":1,"dirtCount":0,"dirtMinHeight":255,"dirtMaxHeight":0,"gravelSize":50,"gravelCount":40,"gravelMinHeight":0,"gravelMaxHeight":256,"graniteSize":50,"graniteCount":40,"graniteMinHeight":0,"graniteMaxHeight":255,"dioriteSize":50,"dioriteCount":39,"dioriteMinHeight":0,"dioriteMaxHeight":255,"andesiteSize":50,"andesiteCount":40,"andesiteMinHeight":0,"andesiteMaxHeight":255,"coalSize":5,"coalCount":40,"coalMinHeight":0,"coalMaxHeight":255,"ironSize":1,"ironCount":1,"ironMinHeight":0,"ironMaxHeight":255,"goldSize":1,"goldCount":1,"goldMinHeight":0,"goldMaxHeight":64,"redstoneSize":1,"redstoneCount":1,"redstoneMinHeight":0,"redstoneMaxHeight":16,"diamondSize":1,"diamondCount":1,"diamondMinHeight":0,"diamondMaxHeight":255,"lapisSize":1,"lapisCount":1,"lapisCenterHeight":0,"lapisSpread":0}

Minecraft throws a crash:

Description: Exception in server tick loop

java.lang.IllegalArgumentException: bound must be positive
	at java.util.Random.nextInt(Random.java:388)
	at aeb.b(SourceFile:323)
	at aeb.a(SourceFile:339)
	at aeb.a(SourceFile:92)
	at aeb.a(SourceFile:49)
	at ady.a(SourceFile:388)
	at aer.a(SourceFile:56)
	at aoa.a(SourceFile:473)
	at ld.a(SourceFile:174)
	at amy.a(SourceFile:875)
	at ld.c(SourceFile:104)
	at net.minecraft.server.MinecraftServer.k(SourceFile:315)
	at bpo.a(SourceFile:112)
	at bpo.i(SourceFile:128)
	at net.minecraft.server.MinecraftServer.run(SourceFile:421)
	at java.lang.Thread.run(Thread.java:745)

Linked issues

Attachments

Comments 10

Invalid unless reproducible on a vanilla client.

Just reproduced with a vanilla client. I didn't think about it, because I nearly always play with Optifine. But yes, same error.

It doesn't crash on my PC. The loading screen doesn't disappear and in the task manager "javaw.exe" uses only a little percentage of my CPU.

Minecraft doesn't terminate, but look at the game output console of the launcher and in the crash-reports directory.

Confirmed for 1.9.4 and 16w21b, although I don't know how helpful it is, because I didn't test which part of the preset makes it crash. And because it takes about a minute even on a fast computer to be sure that it did crash and additional time to kill and restart the game, so it's tedious to test.

Confirmed for 1.10-pre1. It even goes to 0% CPU pretty quickly: As soon as the world generation started, I started the task manager, scrolled down to javaw.exe and it already had 0% CPU.

I have this issue in 18w20a with some normal old worlds. Crash log:

---- Minecraft Crash Report ----
// This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]

Time: 15.05.18 17:37
Description: Exception generating new chunk

java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: bound must be positive
	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2237)
	at si.c(SourceFile:130)
	at sq.a(SourceFile:84)
	at sr.c(SourceFile:143)
	at sj.i_(SourceFile:223)
	at net.minecraft.server.MinecraftServer.w(SourceFile:689)
	at net.minecraft.server.MinecraftServer.v(SourceFile:622)
	at dhq.v(SourceFile:156)
	at net.minecraft.server.MinecraftServer.run(SourceFile:527)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: bound must be positive
	at java.util.Random.nextInt(Random.java:388)
	at bzs.a(SourceFile:203)
	at bzu.a(SourceFile:186)
	at bzu.a(SourceFile:182)
	at bzj.a(SourceFile:59)
	at byz$a.a(SourceFile:266)
	at bzh.a(SourceFile:60)
	at bvq.a(SourceFile:90)
	at bxw.a(SourceFile:16)
	at bxw.a(SourceFile:13)
	at brt.a(SourceFile:27)
	at bbv.a(SourceFile:515)
	at bpg.a(SourceFile:109)
	at sx.a(SourceFile:12)
	at sw.a(SourceFile:33)
	at bpk.a(SourceFile:85)
	at tc.a(SourceFile:59)
	at tc.a(SourceFile:23)
	at agd$a.a(SourceFile:143)
	at agd$a$$Lambda$1487/654770071.apply(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncApply.exec(CompletableFuture.java:501)
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:902)
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1689)
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1644)
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)


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

-- Head --
Thread: Server thread
Stacktrace:
	at si.a(SourceFile:180)

-- Chunk to be generated --
Details:
	Location: 17,7
	Position hash: 30064771089
	Generator: brb@342f5d5f
Stacktrace:
	at si.a(SourceFile:180)
	at si.c(SourceFile:133)
	at sq.a(SourceFile:84)
	at sr.c(SourceFile:143)
	at sj.i_(SourceFile:223)
	at net.minecraft.server.MinecraftServer.w(SourceFile:689)
	at net.minecraft.server.MinecraftServer.v(SourceFile:622)
	at dhq.v(SourceFile:156)
	at net.minecraft.server.MinecraftServer.run(SourceFile:527)
	at java.lang.Thread.run(Thread.java:745)

-- Affected level --
Details:
	Level name: 18w11a
	All players: 1 total; [sl['MaxiHuHe04'/235, l='18w11a', x=-240.50, y=82.69, z=130.90]]
	Chunk stats: ServerChunkCache: 4112 Drop: 0
	Level seed: -4624657799099224251
	Level generator: ID 00 - default, ver 1. Features enabled: true
	Level generator options: null
	Level spawn location: World: (-248,64,136), Chunk: (at 8,4,8 in -16,8; contains blocks -256,0,128 to -241,255,143), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511)
	Level time: 10177 game time, 13003 day time
	Level dimension: 0
	Level storage version: 0x04ABD - Anvil
	Level weather: Rain time: 44002 (now: false), thunder time: 89984 (now: false)
	Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true

-- System Details --
Details:
	Minecraft Version: 18w20a
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_25, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 3759996904 bytes (3585 MB) / 4798283776 bytes (4576 MB) up to 5368709120 bytes (5120 MB)
	JVM Flags: 8 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx5G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M
	Profiler Position: N/A (disabled)
	Player Count: 1 / 8; [sl['MaxiHuHe04'/235, l='18w11a', x=-240.50, y=82.69, z=130.90]]
	Data Packs: vanilla
	Type: Integrated Server (map_client.txt)
	Is Modded: Probably not. Jar signature remains and both client + server brands are untouched.

@unknown: Not quite.
This ticket: Exception in server tick loop
Yours: Exception generating new chunk
Your issue is MC-125134

I would then say that mine is a new issue (or another one I didn’t find). The main exception of my issue is that a random somehow got negative bounds. The main exception in the other issue is a custom RuntimeException which has something to do with chunks. Exception generating new chunk could probably be many different exceptions.

@unknown: Keep in mind that the symbols in the stack trace are obfuscated. The stack trace of some other snapshot in the description of MC-125134 is exactly the same as your 18w20a stack trace.

FaRo1

(Unassigned)

Confirmed

crash, customized-world, customized-world-settings

Minecraft 1.8.4, Minecraft 1.8.8, Minecraft 15w49b, Minecraft 1.9.4, Minecraft 16w21b, ..., Minecraft 1.12, Minecraft 1.12.1, Minecraft 1.12.2, Minecraft 17w43a, Minecraft 17w43b

Retrieved