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

IndexOutOfBoundsException on undo redo multiple time press #33

Open
andysagar opened this issue Jun 7, 2019 · 1 comment
Open

IndexOutOfBoundsException on undo redo multiple time press #33

andysagar opened this issue Jun 7, 2019 · 1 comment

Comments

@andysagar
Copy link

I am getting this error when i press undo or redo button multiple times quickly

java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.byox.drawview.views.DrawView.onDraw(DrawView.java:202)
at android.view.View.draw(View.java:16199)
at android.view.View.updateDisplayListIfDirty(View.java:15196)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3596)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3576)
at android.view.View.updateDisplayListIfDirty(View.java:15156)
at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281)
at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287)
at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2627)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2446)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2079)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1119)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6060)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
at android.os.Handler.handleCallback(Handler.java:746)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

@andysagar andysagar changed the title Indexoutofbound on undo redo multiple time press IndexOutOfBoundsException on undo redo multiple time press Jun 7, 2019
@jsh-me
Copy link

jsh-me commented May 21, 2020

try canUndo(), canRedo() function

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