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

ArrayIndexOutOfBoundsException #10

Closed
silencebeat opened this issue Oct 27, 2017 · 2 comments · May be fixed by #33
Closed

ArrayIndexOutOfBoundsException #10

silencebeat opened this issue Oct 27, 2017 · 2 comments · May be fixed by #33

Comments

@silencebeat
Copy link

Hi,

i tried your library but i got this error
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0 at com.andrognito.patternlockview.PatternLockView$Dot.of(PatternLockView.java:1195) at com.andrognito.patternlockview.PatternLockView.checkForNewHit(PatternLockView.java:925) at com.andrognito.patternlockview.PatternLockView.detectAndAddHit(PatternLockView.java:784) at com.andrognito.patternlockview.PatternLockView.handleActionDown(PatternLockView.java:1080) at com.andrognito.patternlockview.PatternLockView.onTouchEvent(PatternLockView.java:442) at android.view.View.dispatchTouchEvent(View.java:11721) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2593) at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:445) at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1828) at android.app.Activity.dispatchTouchEvent(Activity.java:3292) at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:68) at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:407) at android.view.View.dispatchPointerEvent(View.java:11960) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4776) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4590) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4274) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4331) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4181) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4147) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4155) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4128) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6642) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6616) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6577) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6745) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:325) at android.os.Looper.loop(Looper.java:142) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

this is my xml code
<com.andrognito.patternlockview.PatternLockView app:dotCount="3" app:aspectRatio="square" android:layout_gravity="center_horizontal" android:id="@+id/pattern_lock_view" android:layout_width="250dp" android:layout_height="250dp"/>

@aritraroy
Copy link
Owner

Unable to reproduce.

@buffermet
Copy link

@aritraroy because you haven't tested your own software? Your pattern locks don't work anymore when changing the dotCount. It throws an ArrayIndexOutOfBoundsException. Please fix it. I've already proposed a PR.

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

Successfully merging a pull request may close this issue.

3 participants