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

saving instance state may throw due to zero bounds #145

Open
masc3d opened this issue Mar 31, 2020 · 8 comments
Open

saving instance state may throw due to zero bounds #145

masc3d opened this issue Mar 31, 2020 · 8 comments

Comments

@masc3d
Copy link
Contributor

masc3d commented Mar 31, 2020

on rare occasions

java.lang.IllegalArgumentException: width and height must be > 0
        at android.graphics.Bitmap.createBitmap(Bitmap.java:829)
        at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
        at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
        at com.github.gcacace.signaturepad.views.SignaturePad.d()
        at com.github.gcacace.signaturepad.views.SignaturePad.getTransparentSignatureBitmap()
        at com.github.gcacace.signaturepad.views.SignaturePad.onSaveInstanceState()
@MrFuFuFu
Copy link

Having the same issue when the view Visibility is GONE and close the fragment will crash.

@assaneonline
Copy link

Any idea how to mitigate this ?

@masc3d
Copy link
Contributor Author

masc3d commented Aug 31, 2020

as long as this is not merged, you could use com.github.masc3d:android-signaturepad:b60f117e instead.
requires jitpack repository maven { url 'https://jitpack.io' }

Repository owner deleted a comment from warting Sep 29, 2021
@Tgo1014
Copy link

Tgo1014 commented Sep 30, 2021

Any news about merging this PR?

@achall9
Copy link

achall9 commented May 30, 2022

I saw this PR is merged, but not showing on v1.3.1 when import using gradle?

@tristanlarsin
Copy link

tristanlarsin commented Jun 2, 2022

I am also encountering this issue on v1.3.1. @masc3d What is the status of the fix?

@padideh
Copy link

padideh commented Sep 27, 2022

i have same issue , is this issue fixed?

@tristanlarsin
Copy link

Here's a temporary fix I did to prevent this - Add android:saveEnabled="false" to the xml layout

<com.github.gcacace.signaturepad.views.SignaturePad
    android:id="@+id/signature_pad"
    android:saveEnabled="false"
    ...
    />

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

7 participants