BlockMap icon indicating copy to clipboard operation
BlockMap copied to clipboard

Failed to render Nether/End with NullPointerException

Open awdavis opened this issue 3 years ago • 10 comments

Environment info

  • BlockMap version: 2.4.1
  • Java version:
    java version "18" 2022-03-22
    Java(TM) SE Runtime Environment (build 18+36-2087)
    Java HotSpot(TM) 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)
    
  • Operating system: Windows 10 Pro Build 19044

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

  • The command does not work for either rendering tiles or a big image on The End
  • The command does not work for either rendering tiles or a big image on the Nether
  • The command does work as expected for rendering tiles and a big image for the Overworld
  • Some but not all of the generated tile images appear empty, for each of the above dimensions preview of end tiles

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)

awdavis avatar Apr 04 '22 02:04 awdavis

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).

piegamesde avatar Apr 04 '22 09:04 piegamesde

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 avatar Apr 04 '22 10:04 awdavis

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

awdavis avatar Apr 04 '22 10:04 awdavis

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

piegamesde avatar Apr 04 '22 11:04 piegamesde

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 avatar Apr 24 '22 01:04 awdavis

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

awdavis avatar Apr 24 '22 06:04 awdavis

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.

piegamesde avatar Apr 24 '22 08:04 piegamesde

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.

awdavis avatar Apr 24 '22 09:04 awdavis

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.

piegamesde avatar Apr 24 '22 09:04 piegamesde

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

awdavis avatar Apr 25 '22 06:04 awdavis