RippleEffect icon indicating copy to clipboard operation
RippleEffect copied to clipboard

java.lang.IllegalStateException: Underflow in restore on Virtual Device

Open WaylanPunch opened this issue 10 years ago • 12 comments

Is that normal if an IllegalStateException occurred when I ran it on the Genymotion Virtual Device ? Because it is OK on real Android Device.

12-21 11:01:58.933 9458-9458/com.***.**** E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.***.****, PID: 9458
java.lang.IllegalStateException: Underflow in restore - more restores than saves
    at android.graphics.Canvas.native_restore(Native Method)
    at android.graphics.Canvas.restore(Canvas.java:540)
    at com.andexert.library.RippleView.draw(RippleView.java:166)
    at android.view.View.updateDisplayListIfDirty(View.java:15174)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
    at android.view.View.updateDisplayListIfDirty(View.java:15134)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
    at android.view.View.updateDisplayListIfDirty(View.java:15134)
    ......

WaylanPunch avatar Dec 21 '15 16:12 WaylanPunch

Same problem here

jeetdholakia avatar Dec 24 '15 01:12 jeetdholakia

I got it only for Android 6. Don't know how to remove this bug

davroux avatar Dec 28 '15 21:12 davroux

Same here. Happens every time on Marshmallow.

NSouth avatar Jan 05 '16 23:01 NSouth

And happens on real devices , not just emulators/genymotion

jeetdholakia avatar Jan 06 '16 05:01 jeetdholakia

I ended up using the solution posted here. Just required adding two lines and commenting out the old compile statement in my gradle file. https://github.com/traex/RippleEffect/issues/81#issuecomment-151215233

NSouth avatar Jan 06 '16 13:01 NSouth

+1

jjhesk avatar Mar 03 '16 10:03 jjhesk

same problem...

karthisammannan avatar Mar 23 '16 09:03 karthisammannan

This has very simple solution. Just downgrade your - targetSdkVersion to 22 It works for all versions.

GirishBhalerao avatar Mar 31 '16 06:03 GirishBhalerao

There are two solutions for this Problem.

  1. 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.
  2. 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...!!! :)

GirishBhalerao avatar Apr 05 '16 10:04 GirishBhalerao

@GirishBhalerao Thanks for your good suggestion. :)

saidurcse avatar Dec 29 '16 04:12 saidurcse

Please try this fixed version as alternative (you can use any targetSdkVersion): https://github.com/patrickpissurno/RippleEffect/

patrickpissurno avatar Aug 17 '17 19:08 patrickpissurno

@patrickpissurno thank you for your work ! it help me !

ihewro avatar Nov 01 '17 03:11 ihewro