Skip to content

Underflow in restore with PGraphicsAndroid2D #287

Closed
@codeanticode

Description

@codeanticode

The use of canvas.save()/restore() sometimes causes the following exception:

java.lang.IllegalStateException: Underflow in restore - more restores than saves
at android.graphics.Canvas.native_restore(Native Method)

particularly when using push and popMatrix(). This issue has been reported elsewhere:

http://stackoverflow.com/questions/23893813/canvas-restore-causing-underflow-exception-in-very-rare-cases
traex/RippleEffect#76

and seems to appear in Android 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions