SydMontague / ImageMaps

draw images on maps
MIT License
44 stars 28 forks source link

Could not render map using renderer net.craftcitizen.imagemaps.ImageMapRenderer #27

Closed skeddles closed 3 years ago

skeddles commented 3 years ago

The plugin worked fine at first, I downloaded and placed like 5 maps, one's 2x3, and they worked between restarts. Then one restart they randomly stopped working. The maps were blank, and it's spamming the below error in my server console:

I can still download maps, but when i place them the item frames are blank.

[20:46:02] [Server thread/ERROR]: Could not render map using renderer net.craftcitizen.imagemaps.ImageMapRenderer
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129) ~[?:?]
    at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181) ~[?:?]
    at org.bukkit.map.MapPalette.imageToBytes(MapPalette.java:197) ~[patched_1.16.5.jar:git-Paper-526]
    at org.bukkit.craftbukkit.v1_16_R3.map.CraftMapCanvas.drawImage(CraftMapCanvas.java:72) ~[patched_1.16.5.jar:git-Paper-526]
    at net.craftcitizen.imagemaps.ImageMapRenderer.render(ImageMapRenderer.java:56) ~[?:?]
    at org.bukkit.craftbukkit.v1_16_R3.map.CraftMapView.render(CraftMapView.java:158) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.WorldMap$WorldMapHumanTracker.a(WorldMap.java:490) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.WorldMap.a(WorldMap.java:367) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.ItemWorldMap.a(ItemWorldMap.java:339) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.EntityTrackerEntry.a(EntityTrackerEntry.java:97) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.EntityTrackerEntry.tick(EntityTrackerEntry.java:75) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.PlayerChunkMap.processTrackQueue(PlayerChunkMap.java:2052) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.PlayerChunkMap.g(PlayerChunkMap.java:2063) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.ChunkProviderServer.tickChunks(ChunkProviderServer.java:864) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.ChunkProviderServer.tick(ChunkProviderServer.java:742) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:461) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1362) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:379) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1214) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1002) ~[patched_1.16.5.jar:git-Paper-526]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[patched_1.16.5.jar:git-Paper-526]
    at java.lang.Thread.run(Thread.java:834) [?:?]

I am using minecraft 1.16.5, with a paper server (paper-1.16.5-526).

SydMontague commented 3 years ago

It seems like Java is unable to find or initialize a graphics environment on your server.

You might have luck running the server with the -Djava.awt.headless=true Java parameter, alternatively you might have to check your server configuration so Java can find the graphics environment—it's not something I can influence with the plugin, sadly.

Also see #15, which is probably a related/similar issue. (-> unset DISPLAY might work as well)