-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
ImagePicker VM Memory Issue #222
Comments
Hi @NatanijelVasic, |
Thank you very much for the reply! I'm quite curious as to what causes this issue now 😄 |
@DimitarTodorov I can confirm that this is happening also on my side. On real device is simply crashing the app. |
Same thing happening on my app. |
Issue is fixed in latest version of nativescript-imagepicker - 6.0.5 |
Issue: Very big memory usage, leading to eventual crash when using the plugin often in one session.
Make sure to check the demo app(s) for sample usage
Testing on demo app and my own app.
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?
Both iOS and Android. Both on simulator and device.
Please, provide the following version numbers that your issue occurs with:
"nativescript": {
"id": "com.natanijel.flipside",
"tns-android": {
"version": "4.2.0"
},
"tns-ios": {
"version": "4.2.0"
}
},
"dependencies": {
"buffer": "^5.1.0",
"crypto-js": "^3.1.9-1",
"is-alphanumeric": "^1.0.0",
"nativescript-background-http": "^3.2.7",
"nativescript-bitmap-factory": "^1.7.1",
"nativescript-camera": "^4.0.2",
"nativescript-imagepicker": "^6.0.4",
"nativescript-onesignal": "^1.0.8",
"nativescript-photo-editor": "^1.0.3",
"nativescript-plugin-firebase": "^7.1.6",
"nativescript-theme-core": "~1.0.4",
"nativescript-ui-listview": "^3.5.7",
"tns-core-modules": "^4.2.1"
},
"devDependencies": {
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"typescript": "^3.0.1"
},
Please, tell us how to recreate the issue in as much detail as possible.
For iOS: Monitor memory using Instruments.
First of all, great plugin! It's simple to use and effective. I'm just having an issue with my memory usage. My app's heap allocations are relatively small and under control, but I have problems with the "Anonymous VM" size over time, which can go into the gigabyte range when using the image-picker plugin often in one session (eventually leading to a crash).
When I load one HD image using the plugin, the Anonymous VM memory goes up by 250MB! I then run Simulate Memory Warning, but the allocation size barely goes down (see attached photo). A 4000x4000px 32bit colour bitmap isn't even 200MB, and my images are significantly smaller in dimension than that. Do you know why so much memory is being allocated without being released?
I have attached an image showing what happens when I load 1 photo (massive jump), followed by running "Simulate Memory Warning" (small dip). As shown in the table, CG Raster Data makes up almost all of the anonymous VM size. It is worth adding that when I load a new image from the plugin, sometimes a portion of the memory is released, but most times there is a growth.
Any help is greatly appreciated!
This memory usage is for the demo app:
The text was updated successfully, but these errors were encountered: