ArrayIndexOutOfBoundsException while rendering water world map #101

Open
TOGoS opened this Issue Mar 20, 2013 · 4 comments

Comments

Projects
None yet
3 participants
Contributor

TOGoS commented Mar 20, 2013

611551604 [3D Render Worker 1] ERROR se.llbit.chunky.renderer.RenderWorker - Render worker 1 crashed with uncaught exception.
java.lang.ArrayIndexOutOfBoundsException: 2147483647
at se.llbit.chunky.model.WaterModel.doWaterDisplacement(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.Scene.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.RenderWorker.work(Unknown Source)
at se.llbit.chunky.renderer.RenderWorker.run(Unknown Source)

This caused Chunky to stop and not render any additional passes, though otherwise the UI seemed responsive.

Contributor

TOGoS commented Mar 25, 2013

Here's a new stack trace with line numbers (from 51b87f9):
java.lang.ArrayIndexOutOfBoundsException: 2147483647
at se.llbit.chunky.model.WaterModel.doWaterDisplacement(WaterModel.java:338)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:94)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:128)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:128)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:185)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(PathTracer.java:45)
at se.llbit.chunky.renderer.scene.Scene.pathTrace(Scene.java:707)
at se.llbit.chunky.renderer.RenderWorker.work(RenderWorker.java:119)
at se.llbit.chunky.renderer.RenderWorker.run(RenderWorker.java:70)

Owner

llbit commented Jun 21, 2013

This was fixed in 1.1.11

llbit closed this Jun 21, 2013

Contributor

TOGoS commented Jul 29, 2013

I am running 1.1.13 and this still happens. Less often, it seems, than it used to, but it is still possible. I suspect this is due to not accounting for long/int limits when the ray happens to shoot nearly precisely at the horizon.

Render worker 0 crashed with uncaught exception.

java.lang.ArrayIndexOutOfBoundsException: -2147483648
at se.llbit.chunky.model.WaterModel.doWaterDisplacement(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.PathTracer.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.scene.Scene.pathTrace(Unknown Source)
at se.llbit.chunky.renderer.RenderWorker.work(Unknown Source)
at se.llbit.chunky.renderer.RenderWorker.run(Unknown Source)

If it can't really be 'fixed' due to mathematical undefinedness at certain points, it would be nice if the path tracer simply bailed and tried again rather than crashing the whole application (this is the approach I took with my own path tracer and it solved a lot of problems all at once).

llbit reopened this Jul 29, 2013

Can this be closed/incorporated into #255 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment