piegamesde / BlockMap

An out-of-game map renderer and viewer for Minecraft 1.13–1.18 worlds [unmaintained]
MIT License
91 stars 22 forks source link

Failed to render Nether/End with NullPointerException #77

Open awdavis opened 2 years ago

awdavis commented 2 years ago

Environment info

Description

Unable to render nether/end maps on relatively new Aternos server.

Steps to reproduce

  1. Download world directory from Aternos and save it at D:/Minecraft/aternos-world
  2. Open Command Prompt
  3. Run "C:/Program Files/Java/jdk-18/bin/java.exe" -jar "D:/Minecraft/BlockMap/BlockMap-cli-2.4.1.jar" --verbose render --output="D:/Minecraft/map-output/end" --dimension=END --create-big-image "D:/Minecraft/aternos-world"
  4. Inspect command output

Actual result

The command fails to produce an image and produces error output.

Expected result:

The command produces an image as expected.

Troubleshooting

Debug log

Full output

test_output.txt

Selected output

WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
22-04-03 19:23:04 INFO  RegionRenderer [58] - Rendering region file -2 -3
22-04-03 19:23:04 WARN  ChunkRenderer_1_18 [249] - Failed to render chunk (22, 0) section -1. This is very likely because your chunk is corrupt. If possible, please verify it manually before sending a bug report.
java.lang.NullPointerException: Cannot invoke "de.piegames.nbt.CompoundMap.get(Object)" because "section" is null
    at de.piegames.blockmap.renderer.ChunkRenderer_1_18.renderSection(ChunkRenderer_1_18.java:297) ~[BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.renderer.ChunkRenderer_1_18.renderChunk(ChunkRenderer_1_18.java:191) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.renderer.RegionRenderer.renderRaw(RegionRenderer.java:149) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.renderer.RegionRenderer.render(RegionRenderer.java:61) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.world.RegionFolder$WorldRegionFolder.render(RegionFolder.java:179) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.render(RegionFolder.java:467) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:249) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:113) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine.executeUserObject(CommandLine.java:1953) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine.access$1300(CommandLine.java:145) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316) [BlockMap-cli-2.4.1.jar:?]
    at picocli.CommandLine.execute(CommandLine.java:2078) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.standalone.CommandLineMain.mainWithoutQuit(CommandLineMain.java:399) [BlockMap-cli-2.4.1.jar:?]
    at de.piegames.blockmap.standalone.CommandLineMain.main(CommandLineMain.java:403) [BlockMap-cli-2.4.1.jar:?]
...
ava.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @21213b92
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
    at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
    at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:180)
    at java.base/java.lang.reflect.Field.setAccessible(Field.java:174)
    at com.google.gson.internal.reflect.UnsafeReflectionAccessor.makeAccessible(UnsafeReflectionAccessor.java:44)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:159)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
    at com.google.gson.Gson.getDelegateAdapter(Gson.java:572)
    at io.gsonfire.gson.HooksTypeAdapterFactory.create(HooksTypeAdapterFactory.java:23)
    at com.google.gson.Gson.getDelegateAdapter(Gson.java:572)
    at io.gsonfire.gson.WrapTypeAdapterFactory.create(WrapTypeAdapterFactory.java:26)
    at com.google.gson.Gson.getAdapter(Gson.java:489)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:117)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:166)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:102)
    at com.google.gson.Gson.getDelegateAdapter(Gson.java:572)
    at io.gsonfire.gson.HooksTypeAdapterFactory.create(HooksTypeAdapterFactory.java:23)
    at com.google.gson.Gson.getDelegateAdapter(Gson.java:572)
    at io.gsonfire.gson.TypeSelectorTypeAdapterFactory$TypeSelectorTypeAdapter.write(TypeSelectorTypeAdapterFactory.java:58)
    at io.gsonfire.gson.NullableTypeAdapter.write(NullableTypeAdapter.java:26)
    at io.gsonfire.util.JsonUtils.toJsonTree(JsonUtils.java:54)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:42)
    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61)
    at io.gsonfire.util.JsonUtils.toJsonTree(JsonUtils.java:54)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:42)
    at com.google.gson.Gson.toJson(Gson.java:735)
    at com.google.gson.Gson.toJsonTree(Gson.java:628)
    at com.google.gson.Gson.toJsonTree(Gson.java:607)
    at io.gsonfire.postprocessors.methodinvoker.MethodInvokerPostProcessor.postSerialize(MethodInvokerPostProcessor.java:82)
    at io.gsonfire.gson.HooksTypeAdapter.runPostSerialize(HooksTypeAdapter.java:72)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:49)
    at io.gsonfire.util.JsonUtils.toJsonTree(JsonUtils.java:54)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:42)
    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97)
    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61)
    at io.gsonfire.util.JsonUtils.toJsonTree(JsonUtils.java:54)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:42)
    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:69)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:127)
    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:245)
    at io.gsonfire.util.JsonUtils.toJsonTree(JsonUtils.java:54)
    at io.gsonfire.gson.HooksTypeAdapter.write(HooksTypeAdapter.java:42)
    at com.google.gson.Gson.toJson(Gson.java:735)
    at com.google.gson.Gson.toJson(Gson.java:714)
    at com.google.gson.Gson.toJson(Gson.java:689)
    at de.piegames.blockmap.world.RegionFolder$CachedRegionFolder.save(RegionFolder.java:536)
    at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:262)
    at de.piegames.blockmap.standalone.CommandLineMain$CommandRender.call(CommandLineMain.java:113)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
    at picocli.CommandLine.access$1300(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
    at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
    at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
    at picocli.CommandLine.execute(CommandLine.java:2078)
    at de.piegames.blockmap.standalone.CommandLineMain.mainWithoutQuit(CommandLineMain.java:399)
    at de.piegames.blockmap.standalone.CommandLineMain.main(CommandLineMain.java:403)
piegamesde commented 2 years ago

I am sorry, but the download link requires me to log in. I suspect that it is bound to your files from your account, so it wouldn't work either way. If you don't mind, please send me the failing file (r.-2.-3.mca in the End folder).

awdavis commented 2 years ago

Attached please find the r.-2.-3.mca file in the DIM1 directory.

On Mon, Apr 4, 2022 at 2:18 AM piegames @.***> wrote:

I am sorry, but the download link requires me to log in. I suspect that it is bound to your files from your account, so it wouldn't work either way. If you don't mind, please send me the failing file (r.-2.-3.mca in the End folder).

— Reply to this email directly, view it on GitHub https://github.com/Minecraft-Technik-Wiki/BlockMap/issues/77#issuecomment-1087315316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAWOWLAYKWPICEZP4WFF5JLVDKXX5ANCNFSM5SODQTMA . You are receiving this because you authored the thread.Message ID: @.***>

awdavis commented 2 years ago

GitHub won't allow uploading .mca files, so here it is in zip format: r.-2.-3.zip

piegamesde commented 2 years ago

I just pushed a potential fix to the develop branch, please check it out

awdavis commented 2 years ago

Thanks, I built the CLI jar from the develop branch and confirmed that my original CLI commands run to completion and no longer produce any errors, so this seems like an improvement.

However, by building manually, I was able to run the GUI for the first time ever (since I am on Windows), and based on the pins, it still seems to note a bunch of corrupt chunks in the End and in the Nether dimensions only. It seems potentially related to the original issue.

End example here: image

java.lang.NullPointerException: Cannot read field "isTranslucent" because "colorData" is null
    at de.piegames.blockmap.renderer.ChunkRenderer_1_18.renderChunk(ChunkRenderer_1_18.java:274)
    at de.piegames.blockmap.renderer.RegionRenderer.renderRaw(RegionRenderer.java:149)
    at de.piegames.blockmap.renderer.RegionRenderer.render(RegionRenderer.java:61)
    at de.piegames.blockmap.world.RegionFolder$WorldRegionFolder.render(RegionFolder.java:179)
    at de.piegames.blockmap.gui.RenderedMap.run(RenderedMap.java:97)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)

Nether example here: image

java.lang.NullPointerException

This makes me think something still isn't quite right...

For comparison, here is a rendering of the Overworld: image

awdavis commented 2 years ago

In the released GUI, there are lots of "Corrupt chunks" in the Nether dimension: image

In the develop branch GUI, those are instead shown as "Unfinished chunks" in the Nether dimension: image

In the released GUI, the End has many "Corrupt chunks" as well: image

In the develop branch GUI, the End only has a few "Unfinished chunks" and doesn't show any "Corrupt chunks." It also only seems to display the "End city" pins that are near an unfinished chunk pin, and the rest do not appear for some reason. image

piegamesde commented 2 years ago

Thank you for the information. My fix does not appear to work as hoped. I have pushed a second attempt onto the developer branch, please try it out and see if it improves things.

awdavis commented 2 years ago

I downloaded the new version and ran gradle regenerate and gradle previewRelease, like I did last time. Here are the results from the GUI: image

image

I am not sure what changes I am supposed to be looking for, but I don't see any obvious difference from since previous commit. I still see the same number of "Unfinished chunks" pins as before.

piegamesde commented 2 years ago

Try walking to those "unfinished" chunks in Minecraft. If they render fine afterwards, nothing's wrong. Otherwise, please send me a region file with them so that I may take a look.

awdavis commented 2 years ago

I walked around in the Nether and rerendered, and it doesn't seem to show any unfinished chunks in the area where I walked, so I'll consider that to be a good sign! (Unfinished chunk pins are off, but the corrupt chunk pins are on.)

before: image

after: image