Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-213583

Crash upon importing world generation settings with over 256 layers

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 21w11a
    • 21w03a, 21w05a, 21w05b, 21w06a, 21w07a, 21w08b, 21w10a
    • None
    • Confirmed
    • Crash
    • Very Important

      The bug

      Upon importing world generation settings that include over 256 layers, the game crashes. I've attached the settings file that I used when experiencing the issue, as well as the full crash report.

      Note that the world height can be any valid height, and that there must be at least 257 layers included.

      How to reproduce

      1. Select Singleplayer → Create New World → More World Options... → Import Settings
      2. Import the 213583.json file
        Game crashes

      Stack trace

      Description: mouseClicked event handler
      
      java.lang.ArrayIndexOutOfBoundsException: 256
      	at ctz.h(SourceFile:236)
      	at ctz.<init>(SourceFile:99)
      	at com.mojang.datafixers.util.Function6.lambda$null$4(Function6.java:18)
      	at com.mojang.serialization.DataResult$Instance.ap3(DataResult.java:337)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$5.decode(RecordCodecBuilder.java:321)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$2.decode(RecordCodecBuilder.java:107)
      	at com.mojang.serialization.MapDecoder.lambda$compressedDecode$0(MapDecoder.java:52)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:52)
      	at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91)
      	at com.mojang.serialization.Decoder$1.decode(Decoder.java:49)
      	at com.mojang.serialization.Codec$2.decode(Codec.java:71)
      	at com.mojang.serialization.Codec$1.decode(Codec.java:45)
      	at com.mojang.serialization.Decoder.parse(Decoder.java:18)
      	at com.mojang.serialization.codecs.FieldDecoder.decode(FieldDecoder.java:29)
      	at com.mojang.serialization.MapCodec$1.decode(MapCodec.java:34)
      	at com.mojang.serialization.MapDecoder$4.decode(MapDecoder.java:94)
      	at com.mojang.serialization.MapCodec$1.decode(MapCodec.java:34)
      	at com.mojang.serialization.codecs.KeyDispatchCodec.lambda$null$1(KeyDispatchCodec.java:67)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.codecs.KeyDispatchCodec.lambda$decode$2(KeyDispatchCodec.java:58)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.codecs.KeyDispatchCodec.decode(KeyDispatchCodec.java:56)
      	at com.mojang.serialization.MapDecoder.lambda$compressedDecode$0(MapDecoder.java:52)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:52)
      	at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91)
      	at com.mojang.serialization.Decoder.parse(Decoder.java:18)
      	at com.mojang.serialization.codecs.FieldDecoder.decode(FieldDecoder.java:29)
      	at com.mojang.serialization.MapCodec$1.decode(MapCodec.java:34)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$3.decode(RecordCodecBuilder.java:249)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$2.decode(RecordCodecBuilder.java:107)
      	at com.mojang.serialization.MapDecoder.lambda$compressedDecode$0(MapDecoder.java:52)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:52)
      	at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91)
      	at com.mojang.serialization.Decoder.parse(Decoder.java:18)
      	at com.mojang.serialization.codecs.BaseMapCodec.lambda$decode$2(BaseMapCodec.java:31)
      	at java.util.stream.ReduceOps$1ReducingSink.accept(ReduceOps.java:80)
      	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
      	at java.util.Iterator.forEachRemaining(Iterator.java:116)
      	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:484)
      	at com.mojang.serialization.codecs.BaseMapCodec.decode(BaseMapCodec.java:27)
      	at com.mojang.serialization.codecs.UnboundedMapCodec.lambda$decode$0(UnboundedMapCodec.java:38)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.codecs.UnboundedMapCodec.decode(UnboundedMapCodec.java:38)
      	at com.mojang.serialization.Decoder$2.decode(Decoder.java:63)
      	at com.mojang.serialization.Codec$2.decode(Codec.java:71)
      	at vv.decode(SourceFile:33)
      	at com.mojang.serialization.Decoder$2.decode(Decoder.java:63)
      	at com.mojang.serialization.Codec$2.decode(Codec.java:71)
      	at com.mojang.serialization.Decoder.parse(Decoder.java:18)
      	at com.mojang.serialization.codecs.FieldDecoder.decode(FieldDecoder.java:29)
      	at com.mojang.serialization.MapCodec$1.decode(MapCodec.java:34)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$Instance$5.decode(RecordCodecBuilder.java:324)
      	at com.mojang.serialization.codecs.RecordCodecBuilder$2.decode(RecordCodecBuilder.java:107)
      	at com.mojang.serialization.MapDecoder.lambda$compressedDecode$0(MapDecoder.java:52)
      	at com.mojang.serialization.DataResult.lambda$flatMap$10(DataResult.java:138)
      	at com.mojang.datafixers.util.Either$Left.map(Either.java:38)
      	at com.mojang.serialization.DataResult.flatMap(DataResult.java:136)
      	at com.mojang.serialization.MapDecoder.compressedDecode(MapDecoder.java:52)
      	at com.mojang.serialization.MapCodec$MapCodecCodec.decode(MapCodec.java:91)
      	at com.mojang.serialization.Decoder$1.decode(Decoder.java:49)
      	at com.mojang.serialization.Codec$2.decode(Codec.java:71)
      	at com.mojang.serialization.Decoder.parse(Decoder.java:18)
      	at dye.a(SourceFile:171)
      	at dra.b(SourceFile:33)
      	at dqu.a(SourceFile:16)
      	at dqy.a(SourceFile:153)
      	at dry.a(SourceFile:27)
      	at dpr.b(SourceFile:92)
      	at duk.a(SourceFile:451)
      	at dpr.a(SourceFile:92)
      	at dpr.c(SourceFile:162)
      	at aow.execute(SourceFile:94)
      	at dpr.b(SourceFile:162)
      	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:3129)
      	at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(SourceFile:140)
      	at dpq.e(SourceFile:1076)
      	at dpq.e(SourceFile:688)
      	at net.minecraft.client.main.Main.main(SourceFile:215)
      

            Unassigned Unassigned
            markderickson [Mod] markderickson
            Votes:
            6 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: