chunky-dev / chunky-dev/chunky

java.lang.NegativeArraySizeException & java.lang.ArrayIndexOutOfBoundsException when Rendering Images with "High" Resolution

Open
#492 4 comments 0 reactions 0 assignees View on GitHub
feature request help wanted
Dominant language
Java
Stars
738
Forks
78
Avg merge
10h 5m
Merged PRs (30d)
3

Description

Hi,

I'm currently trying to render Images with high resolutions and face some Issues.
When trying to render in a resolution higher than 35520x19980 the problems beginn to show up.
1. When Trying to render in 36480x20520 Chunky crashes after scene Loading with this Error
```
Loading scene took 0m 1s

Unchecked exception caused Chunky to close.
java.lang.NegativeArraySizeException
at se.llbit.chunky.renderer.scene.Scene.initBuffers(Scene.java:366)
at se.llbit.chunky.renderer.scene.Scene.importFromJson(Scene.java:2535)
at se.llbit.chunky.renderer.scene.Scene.fromJson(Scene.java:2379)
at se.llbit.chunky.renderer.scene.Scene.loadDescription(Scene.java:2501)
at se.llbit.chunky.renderer.scene.Scene.loadScene(Scene.java:473)
at se.llbit.chunky.renderer.scene.SynchronousSceneManager.loadScene(SynchronousSceneManager.java:146)
at se.llbit.chunky.main.Chunky.doHeadlessRender(Chunky.java:159)
at se.llbit.chunky.main.Chunky.main(Chunky.java:208)

Failed to launch Chunky. Command used:
/usr/lib/jvm/java-8-oracle/jre/bin/java -Xmx153600m -Dchunky.home=/home/user/.chunky -classpath /home/user/.chunky/lib/chunky-core-1.4.5.jar:/home/user/.chunky/lib/commons-math3-3.2.jar se.llbit.chunky.main.Chunky -texture /home/user/txtpack.zip -target 1 -render resolutiontest
```

2. When trying to render even Larger Images with a resolution of 61440x34560 the scene is successfull loaded, but chunky crashed while rendering with this error
```Loading octree took 0m 0s 1)
Loading regions took 0m 0s1)
Loading entities took 0m 0s)
Loading chunks: 100.0% (1,024 of 1,024)
Loading chunks took 0m 3s 1)
Finalizing octree took 0m 1s
Loading scene took 0m 13s
Rendering: 0.0% (0 of 1) [ETA=1011703407:30:07]

Render worker 1 crashed with uncaught exception.
java.lang.ArrayIndexOutOfBoundsException: 2075259000
at se.llbit.chunky.renderer.RenderWorker.work(RenderWorker.java:135)
at se.llbit.chunky.renderer.RenderWorker.run(RenderWorker.java:71)
```

Both Issues are showing up regardless of the Map I choose.

I'm using Chunky 1.4.5 and java version 1.8.0_181 64 Bit on a debian 9.5
Regarding the HW: I'm running a Xeon w-2145 with 256 GB ram.
If you need any more Information please let me know.

Thanks for your help.

kind regards
Max

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.