mojira.dev
MC-46350

Crash: n must be positive

This is not a duplicate of this same issue, which was marked as fixed, since this is on a newer version.

The attached save file produces te attached crash report. Sometimes immediately, sometimes after flying around a bit.
The save file is of a custom map made with WorldPainter, but it should work normally (and does load and is playable for a while).
The crash report says n must be positive, referring an argument to Random.NextInt.

There are several issues closed for this same crash and it's considered fixed, but it is still happening on 1.7.4 and on the latest snapshot.

Thanks for the hard work. =3

Linked issues

Attachments

Comments 7

I am having the same issue. Using NBTExplorer, I noted that my coordinates were at -92, 114, -9. I think that this issue may be related to the positioning of the player, but I'm not sure.
EDIT: Using NBTExplorer to change my coordinates did nothing, after checking again, they were back to the original coordinates.

I found that this happens when there are ungenerated chunks in the custom map near the player. I believe this might be an issue with the terrain generator.

Is this still a concern in the current Minecraft version 14w30c or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

I was able to reproduce this in 14w31a. The bug happens when lapis spread height is set to zero.

just had this happen on 14w34c. Its an empty world with a floating spawn area.
u: Exception ticking world
at net.minecraft.server.MinecraftServer.z(SourceFile:603) ~[minecraft_server.14w34c.jar:?]
at po.z(SourceFile:305) ~[minecraft_server.14w34c.jar:?]
at net.minecraft.server.MinecraftServer.y(SourceFile:531) ~[minecraft_server.14w34c.jar:?]
at net.minecraft.server.MinecraftServer.run(SourceFile:447) [minecraft_server.14w34c.jar:?]
at java.lang.Thread.run(Unknown Source) [?:1.7.0_09]
Caused by: java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Unknown Source) ~[?:1.7.0_09]
at arv.a(SourceFile:153) ~[minecraft_server.14w34c.jar:?]

The same here. I'm on the version 1.8

Is this still an issue in the most recent versions (currently that is 1.10.2, or 16w42a) of Minecraft? If so, please update the affected versions and help us keeping this ticket updated from time to time.

Guillermo Jimeno Espinosa

(Unassigned)

Community Consensus

Minecraft 14w04b, Minecraft 14w31a, Minecraft 14w34a, Minecraft 1.8

Retrieved