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

Library sometimes crashes during start of the activity when it is placed. #179

Open
fkulik opened this issue Feb 29, 2024 · 2 comments
Open

Comments

@fkulik
Copy link

fkulik commented Feb 29, 2024

Android 8.1.0
Crash occurs in listener, is there any way to prevent it?

Fatal Exception: java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.createBitmap(Bitmap.java:1013)
at android.graphics.Bitmap.createBitmap(Bitmap.java:980)
at android.graphics.Bitmap.createBitmap(Bitmap.java:930)
at android.graphics.Bitmap.createBitmap(Bitmap.java:891)
at com.github.gcacace.signaturepad.views.SignaturePad.ensureSignatureBitmap(SignaturePad.java:573)
at com.github.gcacace.signaturepad.views.SignaturePad.setSignatureBitmap(SignaturePad.java:243)
at com.github.gcacace.signaturepad.views.SignaturePad$1.onGlobalLayout(SignaturePad.java:274)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:945)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2299)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1441)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6840)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
at android.view.Choreographer.doCallbacks(Choreographer.java:778)
at android.view.Choreographer.doFrame(Choreographer.java:713)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6518)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

@kojofosu
Copy link

kojofosu commented Mar 2, 2024

Having same issue. But this happens when you set the visibility of the signature pad to GONE

@fkulik
Copy link
Author

fkulik commented Mar 4, 2024

Unfortunately I didn't set visibillity for signature pad

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

2 participants