leMaik / ChunkyMap

Photorealistic Dynmap world map renderer using Chunky (Minecraft 1.13 and newer). :world_map::sparkles:
GNU General Public License v3.0
86 stars 11 forks source link

Render Fails to Initiate #18

Closed MrKorvic closed 3 years ago

MrKorvic commented 4 years ago

Howdy! Just installed ChunkyMap and the render is throwing an error at me and won't start. I've got Dynmap hooked up to a MySQL database for the render itself, and there's plenty of space on the drive. I'm running Paper 186 currently, and Dynmap 3.1 beta 3a. ChunkyMap created a '1.16.2' jar on server restart, and a json file that has one option; "loadPlayers":false. Below is the stacktrace, followed by my current config. Looking to see if I missed something or if this is possibly an error with using MySQL or somesuch.

Error

.... [16:08:34 WARN]: Unchecked exception in render manager .... [16:08:34 WARN]: java.lang.ExceptionInInitializerError .... [16:08:34 WARN]: at de.lemaik.chunkymap.rendering.local.ChunkyRenderer.lambda$render$1(ChunkyRenderer.java:141) .... [16:08:34 WARN]: at se.llbit.chunky.renderer.RenderManager.pathTraceLoop(RenderManager.java:229) .... [16:08:34 WARN]: at se.llbit.chunky.renderer.RenderManager.run(RenderManager.java:163) .... [16:08:34 WARN]: Caused by: java.io.IOException: No space left on device .... [16:08:34 WARN]: at java.io.FileOutputStream.writeBytes(Native Method) .... [16:08:34 WARN]: at java.io.FileOutputStream.write(FileOutputStream.java:326) .... [16:08:34 WARN]: at kotlin.io.ByteStreamsKt.copyTo(IOStreams.kt:108) .... [16:08:34 WARN]: at kotlin.io.ByteStreamsKt.copyTo$default(IOStreams.kt:103) .... [16:08:34 WARN]: at net.time4tea.oidn.Oidn$Companion.copyLibrary(Oidn.kt:79) .... [16:08:34 WARN]: at net.time4tea.oidn.Oidn$Companion.loadLibrary(Oidn.kt:63) .... [16:08:34 WARN]: at net.time4tea.oidn.Oidn.(Oidn.kt:55) .... [16:08:34 WARN]: ... 3 more .... [16:08:34 WARN]: .... [16:08:35 INFO]: Unknown item ID: minecraft:player_head .... [16:08:35 INFO]: .... [16:08:35 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [16:08:35 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_1, color: [0.6901961, 0.18039216, 0.14901961, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_1_overlay} .... [16:08:35 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [16:08:35 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_2, color: [0.11372549, 0.11372549, 0.12941177, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_2_overlay} .... [16:08:35 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [16:08:35 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_1, color: [0.6901961, 0.18039216, 0.14901961, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_1_overlay} .... [16:08:35 WARN]: Unchecked exception in render manager .... [16:08:35 WARN]: java.lang.NoClassDefFoundError: Could not initialize class net.time4tea.oidn.Oidn .... [16:08:35 WARN]: at de.lemaik.chunkymap.rendering.local.ChunkyRenderer.lambda$render$1(ChunkyRenderer.java:141) .... [16:08:35 WARN]: at se.llbit.chunky.renderer.RenderManager.pathTraceLoop(RenderManager.java:229) .... [16:08:35 WARN]: at se.llbit.chunky.renderer.RenderManager.run(RenderManager.java:163) .... [16:08:35 WARN]:

worlds.txt


#
# NOTES:
#   All lines here are commented with the # symbol - delete the # symbol on copied lines you wish to enable
#   Definitions of a world made here will superecede any world definition with the same name in configuration.txt
#   Deleting this file will result in a fresh copy being produced by dynmap.jar on the next startup.
#
worlds:
  # Worlds can be handled by templates, based on world type
  # You can override the properties of the template by specifying them in this section
  #    for example 'Title: "My Awesome World"'
  #- name: world
  #  title: "World"
  #   Use 'enabled: false' to disable a certain world.
  #  enabled: false
  #   Use sendposition: false to prevent player positions from showing when on this world (if sendposition is globally enabled)
  #  sendposition: false
  #   Use sendhealth: false ot prevent player health from showing when on this world (if sendhealth is globally enabled)
  #  sendhealth: false
  #  # If world isn't contiguous chunks (due to teleporting, for example), fullrender needs to be given other locations to scan for tiles on each patch of chunks
  #  fullrenderlocations:
  #    - x: 10000
  #      y: 64
  #      z: 20000
  #    - x: -15000
  #      y: 64
  #      z: -5000
  #  # Use visibilitylimits to restrict which areas of maps on your world to render (zero or more shapes can be defined)
  #  # For a rectangle, the area is defined by x0, z0 to x1, z1
  #  # For a circle, the area is defined by a center at x,z with a radius 'r'
  #  visibilitylimits:
  #    - x0: -1000
  #      z0: -1000
  #      x1: 1000
  #      z1: 1000
  #    - x: -2000
  #      z: -1000
  #      r: 200
  #  # Use hiddenlimits to specifically hide portions of your world (the opposite of visibilitylimits)
  #  # For a rectangle, the area is defined by x0, z0 to x1, z1
  #  # For a circle, the area is defined by a center at x,z with a radius 'r'
  #  hiddenlimits:
  #    - x0: 100
  #      z0: 0
  #      x1: 200
  #      z1: 0
  #    - x: -2000
  #      z: -1000
  #      r: 200
  #  # Use hidestyle to control how hidden-but-existing chunks are to be rendered (air=empty air (same as ungenerated), stone=a flat stone plain, ocean=a flat ocean)
  #  hidestyle: stone
  #   Use 'template: mycustomtemplate' to use the properties specified in the template 'mycustomtemplate' to this world. Default it is set to the environment-name (normal or nether).
  #  template: mycustomtemplate
  #   Rest of comes from template - uncomment to tailor for world specifically
  #  # World center - default is spawn point
  #  center:
  #    x: 0
  #    y: 64
  #    z: 0
  #  # If bigworld set to true, use alternate directory layout better suited to large worlds
  #  bigworld: true
  #  # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
  #  extrazoomout: 3
  #  # Default delay on processing of updated tiles, in seconds.  This can reduce potentially expensive re-rendering
  #  # of frequently updated tiles (such as due to machines, pistons, quarries or other automation).  Value can also be set on
  #  # individual maps.
  #  tileupdatedelay: 30
  #  maps:
  #    - class: org.dynmap.hdmap.HDMap
  #      name: flat
  #      title: "Flat"
  #      prefix: flat
  #      perspective: iso_S_90_lowres
  #      shader: stdtexture
  #      lighting: shadows
  #      mapzoomin: 1
  #    - class: org.dynmap.hdmap.HDMap
  #      name: surface
  #      title: "Surface"
  #      prefix: t
  #      perspective: iso_SE_30_hires
  #      shader: stdtexture
  #      lighting: shadows
  #      mapzoomin: 1
  #    - class: org.dynmap.hdmap.HDMap
  #      name: cave
  #      title: "Cave"
  #      prefix: ct
  #      perspective: iso_SE_60_lowres
  #      shader: cave
  #      lighting: default
  #      mapzoomin: 3
  #
  # To just label world, and inherit rest from template, just provide name and title
  #- name: world2
  #  title: "Second World"
  #
  #- name: nether
  #  title: "Nether"
  #  center:
  #    x: 0
  #    y: 64
  #    z: 0
  #  # Number of extra zoom-out levels for world (each level is twice as big as the previous one)
  #  extrazoomout: 3
  #  maps:
  #    - class: org.dynmap.hdmap.HDMap
  #      name: flat
  #      title: "Flat"
  #      prefix: flat
  #      perspective: iso_S_90_lowres
  #      shader: stdtexture
  #      lighting: nethershadows
  #      # Map background color (day or night)
  #      background: "#300806"
  #      mapzoomin: 1
  #    - class: org.dynmap.hdmap.HDMap
  #      name: nether
  #      title: "Surface"
  #      prefix: nt
  #      perspective: iso_SE_30_hires
  #      shader: stdtexture
  #      lighting: nethershadows
  #      # Map background color (day or night)
  #      background: "#300806"
  #      mapzoomin: 1
  - name: world
    title: "Overworld"
    enabled: false
  - name: world_nether
    title: "Nether"
    enabled: false
  - name: world_the_end
    title: "The End"
    enabled: false
  - name: tutisle_nether
    title: "Nether"
    enabled: false
  - name: tutisle_the_end
    title: "The End"
    enabled: false
  - name: BoneZone
    title: "The Bone Zone"
    enabled: false
  - name: dungeonworld
    title: "Dungeons"
    enabled: false
  - name: Mines
    title: "Mineworld"
    enabled: false
  - name: Modworld
    title: "Modworld"
    enabled: false
  - name: Anoma
    title: "Anoma"
    enabled: true
    sendposition: false
    visibilitylimits:
      - x0: 1450
        z0: 980
        x1: 2600
        z1: 2850
      - x0: 2600
        z0: 2100
        x1: 3650
        z1: 2850
      - x0: 2600
        z0: 1200
        x1: 3300
        z1: 2100
      - x0: 1150
        z0: 1150
        x1: 1450
        z1: 2600
      - x0: 1700
        z0: 2850
        x1: 3200
        z1: 3000
      - x0: 3300
        z0: 1800
        x1: 3550
        z1: 2100
    hidestyle: air
    center:
      x: 2500
      y: 200
      z: 2500
    maps:
      - class: de.lemaik.chunkymap.dynmap.ChunkyMap
        name: flat
        title: "Flat"
        prefix: flat
        perspective: iso_S_90_lowres
        chunkyThreads: 2
        samplesPerPixel: 20
        denoiser:
          enabled: true
          albedoSamplesPerPixel: 4
          normalSamplesPerPixel: 4
      - class: de.lemaik.chunkymap.dynmap.ChunkyMap
        name: surface
        title: "Isometric"
        prefix: 3d
        perspective: iso_SW_30_lowres
        chunkyThreads: 2
        samplesPerPixel: 20
        denoiser:
          enabled: true
          albedoSamplesPerPixel: 4
          normalSamplesPerPixel: 4
  - name: tutisle
    title: "Sanctuary"
    enabled: true
    sendposition: false
    visibilitylimits:
      - x0: -250
        z0: -250
        x1: 250
        z1: 250
    hidestyle: air
    center:
      x: 0
      y: 200
      z: 0
    maps:
      - class: de.lemaik.chunkymap.dynmap.ChunkyMap
        name: flat
        title: "Flat"
        prefix: flat
        perspective: iso_S_90_lowres
        chunkyThreads: 2
        samplesPerPixel: 20
        denoiser:
          enabled: true
          albedoSamplesPerPixel: 4
          normalSamplesPerPixel: 4
      - class: de.lemaik.chunkymap.dynmap.ChunkyMap
        name: surface
        title: "Isometric"
        prefix: 3d
        perspective: iso_SW_30_lowres
        chunkyThreads: 2
        samplesPerPixel: 20
        denoiser:
          enabled: true
          albedoSamplesPerPixel: 4
          normalSamplesPerPixel: 4```
leMaik commented 4 years ago

.... [16:08:34 WARN]: Caused by: java.io.IOException: No space left on device

Uhm... is your hard drive full? 🤔

MrKorvic commented 4 years ago

and there's plenty of space on the drive.

Update; The first issue comes from trying to run two renders at once. Dynmap normally has no issue with that, however, when using the command myself in the console to only do a full render of one map, the IOException goes away. Now the only error that's thrown is related to not finding net.time4tea.oidn.Oidn.

.... [12:38:35 WARN]: Unchecked exception in render manager .... [12:38:35 WARN]: java.lang.NoClassDefFoundError: Could not initialize class net.time4tea.oidn.Oidn .... [12:38:35 WARN]: at de.lemaik.chunkymap.rendering.local.ChunkyRenderer.lambda$render$1(ChunkyRenderer.java:141) .... [12:38:35 WARN]: at se.llbit.chunky.renderer.RenderManager.pathTraceLoop(RenderManager.java:229) .... [12:38:35 WARN]: at se.llbit.chunky.renderer.RenderManager.run(RenderManager.java:163) .... [12:38:35 WARN]:

Update 2; So even when running one at a time it sometimes throws the IOException, however upon cancelling and re-running it the IOException error goes away. NoClassDefFoundError still occurs, however.

leMaik commented 4 years ago

Now the only error that's thrown is related to not finding net.time4tea.oidn.Oidn.

The stacktrace above clearly stated that somehow there wasn't enough disk space available when extracting the Oidn library. It tries to extract it into /tmp (on Linux), so maybe that partition was full? You can however disable the denoiser and move on.

So even when running one at a time it sometimes throws the IOException

I can't tell you more than the exception does. For some reason, ChunkyMap fails to create the files and the error message explains why.

MrKorvic commented 4 years ago

All servers and the outer box itself have tons of room to work with (2TB), however running a Ptero panel so that might be blocking it from accessing /tmp directly. I'll look into that more when I get home from work. In the meantime, do I need Chunky and/or Oidn installed on the machine itself for ChunkyMap to run?

Update; Deactivated the denoiser for the time being so the map can actually function. Failing to find texture spam in console. Do I need to download something to add on to ChunkyMap? It seems like it really struggles to make it's own files here.

.... [13:00:57 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [13:00:57 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_1, color: [0.11372549, 0.11372549, 0.12941177, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_1_overlay} .... [13:00:57 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [13:00:57 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_1, color: [0.08627451, 0.6117647, 0.6117647, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_1_overlay} .... [13:00:57 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [13:00:57 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_2, color: [0.23529412, 0.26666668, 0.6666667, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_2_overlay} .... [13:00:57 WARN]: Minecraft Jar not found: falling back on placeholder textures. .... [13:00:57 INFO]: Failed to load texture: {texture: {texture: assets/minecraft/textures/models/armor/leather_layer_1, color: [0.49019608, 0.50980395, 0.7764706, 0.0]}, overlay: assets/minecraft/textures/models/armor/leather_layer_1_overlay}

leMaik commented 4 years ago

@MrKorvic Not being able to access the tmp directory would explain the behavior you see. You don't need anything to be installed for the denoiser to work, it just needs to be able to extract the native library into the temporary directory.

Regarding the textures… It's supposed to download them into the plugin directory and load them from there. Is there any error while downloading the file before? Are you using a custom texturepack? Most likely it's due to the textures not even downloading because initialization fails due to not being able to write to the temp directory. Fix that first.

MrKorvic commented 4 years ago

Good to know, I'll see what I can figure out regarding the /tmp directory. Is there any way to specify the directory in a config or somesuch? With docker each server instance has its own temp directory afaik that I'd prefer to have it build in, if possible.

Texture-wise, it was able to get default textures other than the leather armor. I added on a texture pack to test and the error went away. Blocks and such had no issue, it was only grabbing the leather armor textures for an armor stand. It's also got the 1.16.2 jar in the ChunkyMap folder from the first restart.

EDIT; Another option is I could pre-load the Oidn jar into the JVM so ChunkyMap doesn't need to create it every time. Would it be possible for you to have the temp directory configurable and/or load from the JVM first, only trying to create the Oidn files if it can't find them?

leMaik commented 4 years ago

@MrKorvic Just create a /tmp directory in your docker images then. Or use a base image that has one.

To customize the temp directory, you could try starting java with java -Djava.io.tmpdir=/path/to/tmpdir

it was only grabbing the leather armor textures for an armor stand

Strange, might be a bug in Chunky. I'll look into that eventually.

leMaik commented 3 years ago

@MrKorvic Hi, it's been a while. :wave: The leather texture bug was fixed in https://github.com/chunky-dev/chunky/pull/745 and the new Chunky version will be used in ChunkyMap 2.5.1 and 2.6.0-pre2 (or any later version).