Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

888k Downloads

NullPointerException: Cannot enter synchronized block because "this.snapcache" is null

mibby opened this issue ยท 5 comments

commented

Follow-up to #3819

Noticed this error when shutting down my server.

Paper dev 130 (1.19.2)
dynmap version 3.5-SNAPSHOT-830 (5d86723)

[03:07:01] [Server thread/INFO]: Saving worlds
[03:07:01] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[03:07:01] [Dynmap Render Thread/ERROR]: [dynmap] Exception during render job: world=world, map=null
[03:07:01] [Dynmap Render Thread/WARN]: java.lang.NullPointerException: Cannot enter synchronized block because "this.snapcache" is null
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericChunkCache.putSnapshot(GenericChunkCache.java:126)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.prepChunkSnapshot(GenericMapChunkCache.java:696)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.lambda$getLoadedChunksAsync$0(GenericMapChunkCache.java:809)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.lambda$getLoadedChunksAsync$1(GenericMapChunkCache.java:829)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.getLoadedChunksAsync(GenericMapChunkCache.java:827)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.loadChunksAsync(GenericMapChunkCache.java:844)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.bukkit.DynmapPlugin$BukkitServer.createMapChunkCache(DynmapPlugin.java:571)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$FullWorldRenderState.processTile(MapManager.java:767)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$FullWorldRenderState.run(MapManager.java:726)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$1.run(MapManager.java:234)
[03:07:01] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$2.run(MapManager.java:252)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[03:07:01] [Dynmap Render Thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:833)
[06:29:43] [Dynmap Render Thread/ERROR]: [dynmap] Exception during render job: world=world, map=null
[06:29:43] [Dynmap Render Thread/WARN]: java.lang.NullPointerException: Cannot enter synchronized block because "this.snapcache" is null
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericChunkCache.putSnapshot(GenericChunkCache.java:126)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.prepChunkSnapshot(GenericMapChunkCache.java:696)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.lambda$getLoadedChunksAsync$0(GenericMapChunkCache.java:809)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.lambda$getLoadedChunksAsync$1(GenericMapChunkCache.java:829)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.getLoadedChunksAsync(GenericMapChunkCache.java:827)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.common.chunk.GenericMapChunkCache.loadChunksAsync(GenericMapChunkCache.java:844)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.bukkit.DynmapPlugin$BukkitServer.createMapChunkCache(DynmapPlugin.java:571)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$FullWorldRenderState.processTile(MapManager.java:767)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$FullWorldRenderState.run(MapManager.java:726)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$1.run(MapManager.java:234)
[06:29:43] [Dynmap Render Thread/WARN]: 	at Dynmap-HEAD-spigot.jar//org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$2.run(MapManager.java:252)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[06:29:43] [Dynmap Render Thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:833)
commented

try the latest beta, 3.4-beta-5, snapshots are not for production use, but I never saw that issue when I tested on paper release branch

commented

try the latest beta, 3.4-beta-5, snapshots are not for production use, but I never saw that issue when I tested on paper release branch

theoretically it's possible, if it couldn't stop the rendering fast enough (it waits 10 seconds), after cache cleanup that error may appear

but it's too deep into the core to analize properly and come with a fix, so maybe only mikeprim can look into that

commented

Should be fixed in 3.5-beta-1

commented

@mibby did you get around to checking on the new dynmap version? if so and it is no longer prevalent you can go ahead and close the issue

commented

I have not seen the error in a while since updating so assuming fixed or greatly improved.