About the "java.lang.IllegalArgumentException"…

Hi,

My game on the android market will give me a crash report every day.

And I found there are many crashes report are “java.lang.IllegalArgumentException”.

I post one crash log and wish someone will tell me how or a direction to fix it.

Thank you in advances.

Here are the logs:

java.lang.IllegalArgumentException: pointerIndex out of range
at android.view.MotionEvent.nativeGetAxisValue(Native Method)
at android.view.MotionEvent.getX(MotionEvent.java:1549)
at org.cocos2dx.lib.Cocos2dxGLSurfaceView.onTouchEvent(Cocos2dxGLSurfaceView.java:317)
at android.view.View.dispatchTouchEvent(View.java:4621)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1560)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1333)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1863)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1287)
at android.app.Activity.dispatchTouchEvent(Activity.java:2309)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1836)
at android.view.View.dispatchPointerEvent(View.java:4689)
at android.view.ViewRoot.deliverPointerEvent(ViewRoot.java:2365)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2034)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4028)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
at dalvik.system.NativeStart.main(Native Method)

I thinkg its know bug on 3.1 tablets.

http://www.cocos2d-x.org/boards/10/topics/2094?r=4712#message-4712

Dear Milda Genius :

I go through the thread, and Minggo Zhang said it’s solved at version 0.9.2.

But I use the latest 0.10.0 and still has kind of this problem.

Can I have another way to solve this ?

Thank you.

Did you replace your java codes?
org.cocos2dx.lib is part of engine.

Dear Minggo:

You are right. It’s my fault that didn’t update the org.cocos2dx.lib(several .java files).

I already update and publish on my game.

ChickenEggs - https://market.android.com/details?id=com.zhihmeng.ChickenEggsX

I will keep update if this fixed or not.

Thank you, Minggo(as always).

BTW, I already got a Galaxy S2 (changed with my iPhone4 32G).

Hope I can find the samsung crash bug. _

Hoping you can find the crash bug.
Interesting game.