Comments (13)
this might help
from android-signaturepad.
It would be great if someone could help looking into that, as unfortunately at the moment I don't have so much time.
from android-signaturepad.
- You can use thirty party image libs to manager the bitmap, such as fresco. They are optimize the memory, such as use ASM memory.
- When you create bitmap, you can set bitmap config to RGB_565 or ARGB_4444. I think it has very small effect, because the signature is black and white.
- At last, You make the bitmap small
from android-signaturepad.
Do you suspect svg to be part of that ?
from android-signaturepad.
I think the issue is related to the view size: currently the bitmap size depends on view width and height. I need to investigate how to limit that size, based on available heap.
from android-signaturepad.
@gcacace u already begin work in this? If not, i'll. I had a lot of crashes in enterprise software 😟
from android-signaturepad.
@gcacace can you please look into this issue on priority as I'm also getting a lot of crashes regularly in my application due to this.
from android-signaturepad.
Hi! I also got this bug at production app a week ago.
Lib version: com.github.gcacace:signature-pad:1.2.1
Device:
- Brand: TCL
- Model: 5056I
- Orientation: Portrait
- RAM free: 245.47 MB
- Disk free: 7.49 GB
Operating System:
- Version: 6.0.1
- Orientation: Portrait
- Rooted: No
Stack trace:
Fatal Exception: java.lang.OutOfMemoryError
Failed to allocate a 3548172 byte allocation with 3410256 free bytes and 3MB until OOM
dalvik.system.VMRuntime.newNonMovableArray (VMRuntime.java)
android.graphics.Bitmap.nativeCreate (Bitmap.java)
android.graphics.Bitmap.createBitmap (Bitmap.java:831)
android.graphics.Bitmap.createBitmap (Bitmap.java:808)
android.graphics.Bitmap.createBitmap (Bitmap.java:775)
com.github.gcacace.signaturepad.views.SignaturePad.ensureSignatureBitmap (SignaturePad.java:573)
com.github.gcacace.signaturepad.views.SignaturePad.clear (SignaturePad.java:157)
com.radaro.mvp.task_completion.view.SignatureFragmentController.lambda$setListeners$0$SignatureFragmentController (SignatureFragmentController.java:78)
com.radaro.mvp.task_completion.view.SignatureFragmentController$$Lambda$0.onClick (Unknown Source)
android.view.View.performClick (View.java:5205)
android.view.View$PerformClick.run (View.java:21164)
android.os.Handler.handleCallback (Handler.java:739)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:148)
android.app.ActivityThread.main (ActivityThread.java:5417)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)
If someone has a working cure for this bug?
Have a nice day!
from android-signaturepad.
@Grimald take a look into previous comment. I reduced the size of bitmap and it solves the problem.
from android-signaturepad.
is this issue fixed? I am still getting the same error with the latest version.
from android-signaturepad.
Hello there !
I'm getting the following log:
E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 3319160) W/ActivityStopInfo: Bundle stats: W/ActivityStopInfo: PersistableBundle stats: [null] D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.fichaatendimento, PID: 27836 java.lang.RuntimeException: android.os.TransactionTooLargeException: data parcel size 3319160 bytes at android.app.servertransaction.PendingTransactionActions$StopInfo.run(PendingTransactionActions.java:161)
I was wondering if I could get some help about this.
You think it might be related to the messages wrote above ?
Regards.
from android-signaturepad.
Is there any updates?
android:saveEnabled="false"
- hotfix for now.
from android-signaturepad.
The issue is not fixed in the most "recent" 1.3.1 from 2020. A simple workaround is to create a custom SignaturePad
implementation like so an remove the dangling Bundle entry:
import android.content.Context
import android.os.Bundle
import android.os.Parcelable
import android.util.AttributeSet
import com.github.gcacace.signaturepad.views.SignaturePad
class FixedSignaturePad(context: Context, attrs: AttributeSet) : SignaturePad(context, attrs) {
override fun onSaveInstanceState(): Parcelable {
val bundle = super.onSaveInstanceState() as Bundle
bundle.remove("signatureBitmap")
return bundle
}
}
A "proper" fix however would be to save the bitmap in the application's cacheDir
and just save a pointer to that file in the saved instance state. It's hilarious to think in first place that saving a Bitmap in a save state is a good idea...
from android-signaturepad.
Related Issues (20)
- sendUserActionEvent() mView== null
- Add annotations in setPenColorRes and setPenColor
- pad端打开签名页时点击menu按键会崩溃 HOT 3
- App crashing due to IllegalAccessError
- 一点小需求 HOT 2
- it an issue for store too large data in one bitmap HOT 1
- On double click you don't call onClear callback
- Cannot Go to Next Page from The signature Pad. The App Crush HOT 3
- On App minimize its crashing HOT 6
- Launching camera Intent app crashes
- Issue while signature pad in Android 12 HOT 3
- Signature Pag ignore latest click
- How to check if the signature pad contains just a dot as signature?
- hi,i want Track playback,can you give me ideas?
- Updated to current Kotlin module versions, it no longer compiles
- 预览上次签名图案,预览图案偏小。需要如何设置?
- Crashing when the activity goes in background on android 11, 12 HOT 2
- Library sometimes crashes during start of the activity when it is placed. HOT 2
- 签名页面置于后台,会瞬间崩溃。 HOT 1
- The signature page crashes when placed in the backend program HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-signaturepad.