I am getting a weird ACRA error:

java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
at java.util.Vector.elementAt(Vector.java:329)
at java.util.Vector.get(Vector.java:443)
at com.coolfone.sonicboom.Maingame.drawgamescreen(Maingame.java:508)
at com.coolfone.sonicboom.Maingame.WinMain(Maingame.java:282)
at com.coolfone.sonicboom.MyRenderer.onDrawFrame(MyRenderer.java:564)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:
1332)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)

Maingame.java:508 corresponds to "FallingEnemy f =
fallingenemies.get(ctr);" here:


                // draw falling enemies
                for (int ctr = 0; ctr < fallingenemies.size(); ctr++) {
                        FallingEnemy f = fallingenemies.get(ctr);
                        gl.glPushMatrix();
                        gl.glTranslatef(f.x, f.y, f.z);
                        gl.glRotatef(-f.angle, 0, 0, 1);
                        // gl.glScalef(.6f, .2f, 1);
                        f.mesh.draw(gl);
                        gl.glPopMatrix();
                }


How is it possible for this line to generate an
ArrayIndexOutOfBoundsException?  I'm pretty sure no other thread is
touching fallingenemies.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to