Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - mahermeg17

Pages: [1]
I'm using the same *.obj file once from the server as an InputStream  and once as a local file packaged into the apk
I get ArrayIndexOutOfBoundsException only when using InputStream.

Help plz.

// Create and set 3D Object from local file works fine
objet3d = Object3D.mergeAll(Loader.loadOBJ(getResources().openRawResource(R.raw.scan_resul), null, 1f));

// Create and set 3D Object from input stream generates ArrayIndexOutOfBoundsException
InputStream ip = new ByteArrayInputStream(;
                try {
                        objet3d = Object3D.mergeAll(Loader.loadOBJ(ip, null, 1f));
                } catch (IOException e) {

java.lang.ArrayIndexOutOfBoundsException: length=2608; index=2608
                                                                         at com.threed.jpct.Loader.createOBJObject(
                                                                         at com.threed.jpct.Loader.loadOBJ(
                                                                         at com.threed.jpct.Loader.loadOBJ(
                                                                         at com.akka.AirCobotMQTT.activity.Visualisation3DReleaseActivity$MyRenderer.onSurfaceChanged(
                                                                         at android.opengl.GLSurfaceView$GLThread.guardedRun(
                                                                         at android.opengl.GLSurfaceView$

Pages: [1]