我有一个奇怪的例外(堆栈跟踪如下)
06-28 01:50:52.900: E/Crittercism(8804): java.lang.IllegalArgumentException: pointerIndex out of range
06-28 01:50:52.900: E/Crittercism(8804): at android.view.MotionEvent.nativeGetAxisValue(Native Method)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.MotionEvent.getX(MotionEvent.java:1974)
06-28 01:50:52.900: E/Crittercism(8804): at android.widget.HorizontalScrollView.onTouchEvent(HorizontalScrollView.java:561)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.View.dispatchTouchEvent(View.java:5604)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2054)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1815)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2060)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1829)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2060)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1829)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2060)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1829)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2060)
06-28 01:50:52.900: E/Crittercism(8804): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1829)
它的奇怪部分是我从不(永远!!!!)调用getX(int index),只调用event.getX()或event.getY()。 这个bug是ICS独有的(4.03和4.04)
有趣但不那么奇怪的是,这几乎是索尼设备所独有的:
error distribution per device models
我已经审核了所有其他提出的类似问题,但在每种情况下问题都出在getX(someIndex或id)上。 任何人都可以对此有所了解吗?