MD2Loader...jelp!!

hello…i created a model and try to load it to java using MD2Loader but i got this error message

java.lang.ArrayIndexOutOfBoundsException: 0
at javax.media.j3d.GeometryStripArrayRetained.setStripVertexCounts(GeometryStripArrayRetained.java:106)
at javax.media.j3d.GeometryStripArray.(GeometryStripArray.java:60)
at javax.media.j3d.TriangleFanArray.(TriangleFanArray.java:60)

but when i load the pac3D.md2 and tris.md2 (download from internet)is ok, no error occur…how to solve it??? thanks

I’ve answered in your LWJGL copy of this post, which evidently is for Java3D.

Please don’t cross post (especially when off topic in two other posts).

Kev

OopS…im very sorry…
but thanks for answering my post…

what can i do to fis the problem?

Fraid you’ll have to get a different model. If model appears to be fine in other places then there’s a bug with the loader, you can either email the author who might fix it, or fix it yourself.

Kev

if i want to fix the problem…what should i do?

thanks

What a strange question. You should:

a) Read the source code
b) Understand the source code
c) Debug the problem
d) Fix the problem
e) Test the fix against your problem
f) Test the fix against old things (regression)

Finally, either release your own version with your problem fixed or send the fix to the author who will no doubt incorporate it.

Kev