Underflow in restore - more restores than saves : on Android M (6.0)
09-09 08:42:48.592 13857 13857 E AndroidRuntime: java.lang.IllegalStateException: Underflow in restore - more restores than saves 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.graphics.Canvas.native_restore(Native Method) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.graphics.Canvas.restore(Canvas.java:540) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at com.andexert.library.RippleView.draw(RippleView.java:166) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15174) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.View.updateDisplayListIfDirty(View.java:15134) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:281) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:287) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:322) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewRootImpl.draw(ViewRootImpl.java:2615) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2434) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2067) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:670) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:606) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 09-09 08:42:48.592 13857 13857 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I get this error too.
Same thing on Nexus 6 on Android 6.0 Build MPA44G. Seems to be a Android bug, i've checked and there are as many restores as saves...
I get this error too.
This is still crashing in the Official release of Android 6.0 that Google is rolling out.
Even I'm getting the same error on Android One device running Android 6.0
same here...
I moved over to com.balysv:material-ripple:1.0.2, that library doesn't crash.
It seems to crash for us when we open another app from a button. Then when we return to the app, it tries to finish the ripple animation and crashes.
@JolandaVerhoef check https://github.com/traex/RippleEffect/issues/74 comment by matthewrice345. He suggests modifying the source code.
Same issue here... Gonna place a separate layout for 21+
I am also getting same error on Android 6.0
@vipinshukla83 Place separate layout for 21+ let the Android M handle the ripple itself. Just use the proper ripple holder for layouts and views
I also have this problem, Android 6.0
I also have this problem, Android 6.0
I've just created PR for this. In case you don't want to wait for it and can use JitPack in your project you can get the fix by using
compile 'com.github.Hitta:RippleEffect:82cf00e551'
in your build.gradle file
@dariav compile 'com.github.Hitta:RippleEffect:82cf00e551' is not working for me
@rex3du Have you tried adding JitPack repository to your build file
repositories {
...
maven { url "https://jitpack.io" }
}
@dariav Thanks.
Hi, i am using this library in my project and I can see you made the changes to fix the error with marshmallow. However I don't know how to apply/get/make those fixes in my project.
This has very simple solution. Just downgrade your - targetSdkVersion to 22 It works for all versions.
There are two solutions for this Problem.
- As I mentioned before - "Just downgrade your - targetSdkVersion to 22 It works for all versions" - This works fine if you have not launched your app with targetSdkVersion 23 yet.
- If you already have launched your app with targetSdkVersion 23 then, instead of adding compile 'com.github.traex.rippleeffect:library:1.3' in dependancies, Download the project by clicking on link - https://codeload.github.com/traex/RippleEffect/zip/master Get library from that and use that in your app. It works great...!!! :)