Author Topic: ArrayIndexOutOfBoundsException when loading 3ds in FPS demo  (Read 8984 times)

Jubilex

  • Guest
ArrayIndexOutOfBoundsException when loading 3ds in FPS demo
« on: November 09, 2003, 05:13:48 pm »
First of all I have to say that the engine looks awesome!

But there is one little thing.. or big.. i don't know.
I tried running the fps demo and it works perfectly.

Then I wanted to play around with the level. I imported it into 3ds and exported it again. And got the error below. I tried making some very simple geometry and exported and got the same error. Even when I just import/export without touching the model I get the error.
Do I have to use a specific version of 3DS or?  I am using 3D Studio Max 3.1

Best regards

  Jub

Error message:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3855
        at com.threed.jpct.Object3D.appendToObject(Unknown Source)
        at com.threed.jpct.Object3D.mergeObjects(Unknown Source)
        at JPCTDemo.<init>(Unknown Source)
        at JPCTDemo.main(Unknown Source)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
ArrayIndexOutOfBoundsException when loading 3ds in FPS demo
« Reply #1 on: November 09, 2003, 06:12:42 pm »
I don't have 3DS at all. All i have are converters from and to 3DS. Seems like the error happens when merging the objects from the 3DS-file into a large one. It would be very helpfull if you could send me such a file of yours, so i can reproduce the problem better.

Edit: Fixed in 0.95

Offline Jubilex

  • byte
  • *
  • Posts: 6
    • View Profile
    • http://www.jubilex.dk
It works!
« Reply #2 on: November 12, 2003, 08:46:34 am »
Just tried the new .95 release yesterday.
It works perfectly, thanks a lot!   I just uppercases the texturenames and everything works when exporting from max 3.1..
One question though.. about collision detection. . are there any issues to be aware of?
I created a very simple "level" consisting of a plane, some boxes and the standard tea pot (from max).. the boxes works fine, but I can step inside the teapot. Any ideas how that can be?
I can send the .3ds file to you if you want to look at it.. or are there just some things I should be aware of when constructing levels where collision detection are used.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
ArrayIndexOutOfBoundsException when loading 3ds in FPS demo
« Reply #3 on: November 12, 2003, 12:50:19 pm »
Are you doing a

Code: [Select]
teapot.setCollisionMode(Object3D.COLLISION_CHECK_OTHERS);

on the teapot?

Offline Jubilex

  • byte
  • *
  • Posts: 6
    • View Profile
    • http://www.jubilex.dk
Nope..
« Reply #4 on: November 12, 2003, 03:57:14 pm »
I just have the teapot as an object in my "level".. it is merged together with the plane and the boxes.. this is probably the wrong way to do it anyway.. it was just a test of your new release.. the collision works fine on the boxes and  the surrounding torus though.

smilies

  Soeren

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
ArrayIndexOutOfBoundsException when loading 3ds in FPS demo
« Reply #5 on: November 12, 2003, 04:29:11 pm »
Please send me the model then, so i can verify the problem myself. It should work... :(