Author Topic: ArrayIndexOutOfBoundsException on Object3D.copy()  (Read 1122 times)

Offline grog

  • byte
  • *
  • Posts: 19
    • View Profile
ArrayIndexOutOfBoundsException on Object3D.copy()
« on: September 09, 2013, 04:31:17 am »
I am trying to port my Android project to PC and getting an exception during Object3D.copy() when invoking the Object3d(Object3D) constructor and Object3D.cloneObject().  Everything is working fine on the Android version.  Seems to happen on all of my objects (which are serialized MD2s), although with a different array index of course.  Using the latest version from the Download page.
Code: [Select]
java.lang.ArrayIndexOutOfBoundsException: 1790
at com.threed.jpct.Object3D.copy(Object3D.java:914)
at com.threed.jpct.Object3D.<init>(Object3D.java:786)
at com.threed.jpct.Object3D.<init>(Object3D.java:763)
I uploaded the mesh that resulted in the above error here.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11983
    • View Profile
    • http://www.jpct.net
Re: ArrayIndexOutOfBoundsException on Object3D.copy()
« Reply #1 on: September 09, 2013, 06:54:32 am »
Make sure that you are not using the version serialized for Android (i.e. in reduced mode) on the deskop, because that won't work.

Offline grog

  • byte
  • *
  • Posts: 19
    • View Profile
Re: ArrayIndexOutOfBoundsException on Object3D.copy()
« Reply #2 on: September 09, 2013, 07:57:12 am »
Aah, right.  Thanks!