mojira.dev
MC-185156

Worldgen settings are not validated and can cause crashes

The bug

Some parameters are not validated and this can lead to a crash. This bug report is meant to list all those cases.

Invalid range

Parameter

Value

Result

noise.size_horizontal
noise.size_vertical

0

Divide by zero

[media]

noise.size_horizontal
noise.size_vertical

< 0

Negative array size

[media]

noise.height

< 1

Bound must be positive

[media]

noise.height

> 256

Index out of bounds

[media]

structures.*.spacing

0

Divide by zero

[media]

Other

Condition

Result

structures.*.spacing <= separation

Bound must be positive

[media]

noise.height < 9 and not a void biome

Bound must be positive

[media]

Unknown (related to spacing)

String index out of range

[media]

Reproduce:

[media]

This list is incomplete. Please help by commenting and attaching a crash report.

Attachments

Comments 2

Additional crash when height is any low value. I've tested 1, 2, and 8 which gave the same crash, appearing similar to the one for height <1.

Json:

[media]

Crash: 

[media]

Not completely fixed in 20w22a. I updated the description to reflect this.

Misode

Fry

Confirmed

Crash, World generation

crash, worldgen-settings

20w21a

20w22a

Retrieved