tom-and-jerry/eyeCam — Issue #7: [BUG] IlligalArgumentException on ColorView.onTouch()
Author: jimmypoms
Created: 2012-02-27 12:29:22+00:00
State: open
Labels: bug

On certain circumstance touch seems to be out of bitmap area, probably a rounding error:

java.lang.IllegalArgumentException: x must be < bitmap.width()
at android.graphics.Bitmap.checkPixelAccess(Bitmap.java:1305)
at android.graphics.Bitmap.getPixel(Bitmap.java:1260)
at ch.hsr.eyecam.view.ColorView$1.onTouch(ColorView.java:50)
at android.view.View.dispatchTouchEvent(View.java:5574)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1692)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1692)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:1965)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1692)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1997)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1456)
at android.app.Activity.dispatchTouchEvent(Activity.java:2414)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1945)
at android.view.View.dispatchPointerEvent(View.java:5759)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2963)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2522)
at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:862)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2531)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4894)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)