jPCT - a 3d engine for Java > Bugs

ArrayIndexOutOfBoundsException in Loader.loadJAW

(1/1)

Uija:
Hi there...
when I load a 100x100 big Terrain with Loader.loadJAW I get an Exception:

--- Code: ---
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10000
at com.threed.jpct.Loader.loadJAW(Unknown Source)
at com.threed.jpct.Loader.loadJAW(Unknown Source)
at client.Uija3d.<init>(Uija3d.java:67)
at client.Uija3d.main(Uija3d.java:175)

--- End code ---

Output befor the Exception is:

--- Code: ---Loading file map.jaw
Expanding buffers...1000000 bytes
File map.jaw loaded...568780 bytes
Parsing Objectfile!
--- End code ---


Is this intended as it might be to slow with that many polygones or is it just an unknown error?

~Jens

EgonOlsen:
That's a hard coded, undocumented  limitation in the loader... :oops:
The code of the jaw-loader is around 6 years old and i've never touched it since then. There is a configuration variable for it, but it's not public. I'll try to get this fixed somehow in the next version or at least exit more gracefully than with an ArrayOutOfBounds from deep inside the Loader.
JAW isn't a very good format anyway...
(3DS and ASC have such limitations too, but they are implied by the format specs themselves).

Uija:
I have written a commandline converter from png to jaw. I took jaw because it was the easiest one ;)
Perhaps I should read some infos about the other fields in ASC and use that one ;)

Uija:
I converted the tool to ASC Output and works fine. thanks for the hint.

EgonOlsen:
ASC is better anyway. However, i've updated the pre-release JAR of 1.07 with a quick fix for the JAW problem. It can be found here: http://www.jpct.net/download/jpct107a2.jar

Navigation

[0] Message Index

Go to full version