java.lang.IllegalArgumentException: Underflow in restoreToCount - more restores than saves

GitHub | silverspace | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Android: Corrupt images rendered in SVG

    GitHub | 7 months ago | silverspace
    java.lang.IllegalArgumentException: Underflow in restoreToCount - more restores than saves

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Underflow in restoreToCount - more restores than saves

    at android.graphics.Canvas.native_restoreToCount()
  2. Android Platform
    Canvas.restoreToCount
    1. android.graphics.Canvas.native_restoreToCount(Native Method)
    2. android.graphics.Canvas.restoreToCount(Canvas.java:566)
    2 frames
  3. com.horcrux.svg
    RNSVGSvgViewShadowNode.onCollectExtraUpdates
    1. com.horcrux.svg.RNSVGVirtualNode.restoreCanvas(RNSVGVirtualNode.java:103)
    2. com.horcrux.svg.RNSVGTextShadowNode.draw(RNSVGTextShadowNode.java:94)
    3. com.horcrux.svg.RNSVGGroupShadowNode.draw(RNSVGGroupShadowNode.java:36)
    4. com.horcrux.svg.RNSVGGroupShadowNode.draw(RNSVGGroupShadowNode.java:36)
    5. com.horcrux.svg.RNSVGGroupShadowNode.draw(RNSVGGroupShadowNode.java:36)
    6. com.horcrux.svg.RNSVGSvgViewShadowNode.drawChildren(RNSVGSvgViewShadowNode.java:59)
    7. com.horcrux.svg.RNSVGSvgViewShadowNode.drawOutput(RNSVGSvgViewShadowNode.java:50)
    8. com.horcrux.svg.RNSVGSvgViewShadowNode.onCollectExtraUpdates(RNSVGSvgViewShadowNode.java:39)
    8 frames
  4. com.facebook.react
    NativeRunnableDeprecated.run
    1. com.facebook.react.uimanager.ReactShadowNode.dispatchUpdates(ReactShadowNode.java:200)
    2. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:758)
    3. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    4. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    5. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    6. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    7. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    8. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    9. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    10. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    11. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    12. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    13. com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive(UIImplementation.java:748)
    14. com.facebook.react.uimanager.UIImplementation.updateViewHierarchy(UIImplementation.java:506)
    15. com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates(UIImplementation.java:494)
    16. com.facebook.react.uimanager.UIManagerModule.onBatchComplete(UIManagerModule.java:457)
    17. com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete(NativeModuleRegistry.java:137)
    18. com.facebook.react.bridge.CatalystInstanceImpl$NativeModulesReactCallback.onBatchComplete(CatalystInstanceImpl.java:453)
    19. com.facebook.react.bridge.queue.NativeRunnableDeprecated.run(Native Method)
    19 frames
  5. Android Platform
    Handler.dispatchMessage
    1. android.os.Handler.handleCallback(Handler.java:746)
    2. android.os.Handler.dispatchMessage(Handler.java:95)
    2 frames
  6. com.facebook.react
    MessageQueueThreadHandler.dispatchMessage
    1. com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
    1 frame
  7. Android Platform
    Looper.loop
    1. android.os.Looper.loop(Looper.java:148)
    1 frame
  8. com.facebook.react
    MessageQueueThreadImpl$3.run
    1. com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:193)
    1 frame
  9. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:818)
    1 frame