Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes when tapping with more fingers #2

Open
tacone opened this issue Mar 29, 2011 · 1 comment
Open

Crashes when tapping with more fingers #2

tacone opened this issue Mar 29, 2011 · 1 comment

Comments

@tacone
Copy link

tacone commented Mar 29, 2011

WorkspaceView crashes when tapping very fast one child window.

To reproduce tap the screen fast using at least two o three fingers, (first with the index finger, then with the second finger, then with the third finger).

I haven't been able to reproduce the issue with just 1 finger, and with two it is difficult to reproduce (at least on a fast smartphone). With three fingers is pretty easy though.

Full stacktrace:

27782 workspace D Intercepted a touch event
27782 MotionEvent V ArrayIndexOutOfBoundsException!!! pointerIndex -1; i -4
27782 AndroidRuntime D Shutting down VM
27782 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x40025a70)
AndroidRuntime E FATAL EXCEPTION: main
27490 AndroidRuntime E java.lang.ArrayIndexOutOfBoundsException
27490 AndroidRuntime E at android.view.MotionEvent.getX(MotionEvent.java:783)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.handleInterceptMove(WorkspaceView.java:497)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.onInterceptTouchEvent(WorkspaceView.java:453)
27490 AndroidRuntime E at org.jared.commons.ui.WorkspaceView.onTouchEvent(WorkspaceView.java:592)
27490 AndroidRuntime E at android.view.View.dispatchTouchEvent(View.java:3778)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:919)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:958)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1716)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1124)
27490 AndroidRuntime E at android.app.Activity.dispatchTouchEvent(Activity.java:2125)
27490 AndroidRuntime E at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1700)
27490 AndroidRuntime E at android.view.ViewRoot.handleMessage(ViewRoot.java:1802)
27490 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99)
27490 AndroidRuntime E at android.os.Looper.loop(Looper.java:143)
27490 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:5068)
27490 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method)
27490 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521)
27490 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
27490 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
27490 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method)

@ol0
Copy link

ol0 commented May 26, 2011

Hello,
My suggestion for quick fix for this one is to add:
"if ( pointerIndex == -1 ) return;"
at the beginning of handleScrollMove and handleInterceptMove.

Bug happens because findPointerIndex can sometimes return "-1". It seems to work fine with this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants