I am getting a rare but consistent error reported by a few users of my Android app. The user feedback is consistent with this web page that reports the error whenever a user of Android Gingerbread 2.3.1 touches the screen in the Tricorder program:
http://code.google.com/p/moonblink/issues/detail?id=138
I call event.recycle() in the onTouchEvent method, but I am not returning false afterwards. So this answer does not apply:
Why would onTouch() generate FATAL EXCEPTION when returning false?
Is this a bug in Gingerbread? I have never heard of this happening to my apps in 2.1 or 2.2.
The entire stack trace as reported by the Google Developer Console is:
java.lang.RuntimeException: MotionEvent{40521420 action=0 x=368.0 y=373.04865 pressure=0.3921569 size=0.0} recycled twice!
at android.view.MotionEvent.recycle(MotionEvent.java:659)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1880)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)