renxin111 / andengine

Automatically exported from code.google.com/p/andengine
0 stars 0 forks source link

Problem of ArrayIndexOutofBound in using multiple object to move on screen #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

I am developing a game, in that I want to move several objects on the screen 
and I am getting this error,

08-23 15:46:50.343: ERROR/AndroidRuntime(6326): FATAL EXCEPTION: UpdateThread
08-23 15:46:50.343: ERROR/AndroidRuntime(6326): 
java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
java.util.ArrayList.get(ArrayList.java:311)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.entity.layer.DynamicCapacityLayer.onManagedUpdate(DynamicCa
pacityLayer.java:74)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.entity.Entity.onUpdate(Entity.java:85)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.entity.scene.Scene.updateLayers(Scene.java:519)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.entity.scene.Scene.onManagedUpdate(Scene.java:306)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.entity.Entity.onUpdate(Entity.java:85)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.engine.Engine.onUpdateScene(Engine.java:430)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.engine.Engine.onUpdate(Engine.java:425)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.engine.Engine.onTickUpdate(Engine.java:402)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
org.anddev.andengine.engine.Engine$UpdateRunnable.run(Engine.java:544)
08-23 15:46:50.343: ERROR/AndroidRuntime(6326):     at 
java.lang.Thread.run(Thread.java:1096)

When I am moving more than one objects on the screen at a time. For, moving 
objects I am using fling operation. Please help me out in this situation.

Thanks & Regards,
Lalit Poptani T.

Original issue reported on code.google.com by lalit.po...@gmail.com on 23 Aug 2011 at 10:23