App crashes when scrolling a lot in android
See original GitHub issuereact-native v0.21
After scrolling a lot (about 200 images) in the gallery, the app crashes:
E/AndroidRuntime(30838): java.lang.OutOfMemoryError: Failed to allocate a 51916812 byte allocation with 16777216 free bytes and 38MB until OOM
E/AndroidRuntime(30838): at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
E/AndroidRuntime(30838): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
E/AndroidRuntime(30838): at android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:634)
E/AndroidRuntime(30838): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:610)
E/AndroidRuntime(30838): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:392)
E/AndroidRuntime(30838): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:418)
E/AndroidRuntime(30838): at com.imagepicker.ImagePickerModule.getResizedImage(ImagePickerModule.java:484)
E/AndroidRuntime(30838): at com.imagepicker.ImagePickerModule.onActivityResult(ImagePickerModule.java:388)
E/AndroidRuntime(30838): at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:173)
E/AndroidRuntime(30838): at com.facebook.react.ReactInstanceManagerImpl.onActivityResult(ReactInstanceManagerImpl.java:526)
E/AndroidRuntime(30838): at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:180)
E/AndroidRuntime(30838): at android.app.Activity.dispatchActivityResult(Activity.java:6192)
E/AndroidRuntime(30838): at android.app.ActivityThread.deliverResults(ActivityThread.java:3603)
E/AndroidRuntime(30838): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3650)
E/AndroidRuntime(30838): at android.app.ActivityThread.access$1400(ActivityThread.java:154)
E/AndroidRuntime(30838): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1370)
E/AndroidRuntime(30838): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(30838): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(30838): at android.app.ActivityThread.main(ActivityThread.java:5294)
E/AndroidRuntime(30838): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30838): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(30838): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime(30838): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Android app crashes while scrolling down - Stack Overflow
I am developing a blogging app for android and I am using firebase for the backend. The app is working fine but the...
Read more >Crashes | Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >app crashing when scrolling too fast, a listview ... - Reddit
After I populate my listview, it downloads the bitmap from the url. I notice when I scroll up or down fast, I see...
Read more >App crashes when scrolling a lot in android #155 - GitHub
Hi! I've been running into this issue as well and the reason seems to be that you decode the images in full resolution...
Read more >App crashes when scrolling - Fitbit Community
When scrolling in the app, the app crashes abs closes as soon as I get to the sleep score data. Please help!!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same problem:
The default value is already
1.0
, just make sure you don’t set a different value. See https://github.com/react-community/react-native-image-picker/#usage for setting the options.