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

Fatal Exception: java.lang.OutOfMemoryError #6799

Closed
oney opened this issue Apr 4, 2016 · 3 comments
Closed

Fatal Exception: java.lang.OutOfMemoryError #6799

oney opened this issue Apr 4, 2016 · 3 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@oney
Copy link

oney commented Apr 4, 2016

My Android app is using React Native 0.22.0, developed on Mac. Everything is fine on development. After releasing today, I got crash reports from Crashlytics.

Report is

Fatal Exception: java.lang.OutOfMemoryError: Failed to allocate a 23103292 byte allocation with 13011316 free bytes and 12MB until OOM
       at dalvik.system.VMRuntime.newNonMovableArray(VMRuntime.java)
       at android.graphics.Bitmap.nativeCreate(Bitmap.java)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:942)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:913)
       at android.graphics.Bitmap.createBitmap(Bitmap.java:880)
       at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:55)
       at com.facebook.imagepipeline.memory.BitmapPool.alloc(BitmapPool.java:30)
       at com.facebook.imagepipeline.memory.BasePool.get(BasePool.java:259)
       at com.facebook.imagepipeline.platform.ArtDecoder.decodeStaticImageFromStream(ArtDecoder.java:137)
       at com.facebook.imagepipeline.platform.ArtDecoder.decodeFromEncodedImage(ArtDecoder.java:81)
       at com.facebook.imagepipeline.decoder.ImageDecoder.decodeStaticImage(ImageDecoder.java:127)
       at com.facebook.imagepipeline.decoder.ImageDecoder.decodeImage(ImageDecoder.java:94)
       at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.doDecode(DecodeProducer.java:188)
       at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder.access$200(DecodeProducer.java:96)
       at com.facebook.imagepipeline.producers.DecodeProducer$ProgressiveDecoder$1.run(DecodeProducer.java:128)
       at com.facebook.imagepipeline.producers.JobScheduler.doJob(JobScheduler.java:207)
       at com.facebook.imagepipeline.producers.JobScheduler.access$000(JobScheduler.java:27)
       at com.facebook.imagepipeline.producers.JobScheduler$1.run(JobScheduler.java:78)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at com.facebook.imagepipeline.core.PriorityThreadFactory$1.run(PriorityThreadFactory.java:43)
       at java.lang.Thread.run(Thread.java:818)

About 50% users face this issue. Really need to be fixed.
screen shot 2016-04-05 at 3 55 46 am
screen shot 2016-04-05 at 3 56 04 am

@paulondc
Copy link

paulondc commented Apr 5, 2016

The device is running out of memory, in the first case it is trying to allocate 22mb for a bitmap where there is only 12mb available. Do you know how much memory your app was allocating until that crash ? because it may be a memory leaking issue

@grabbou
Copy link
Contributor

grabbou commented Apr 20, 2016

I haven't noticed anything alarming in the apps I have deployed on Android to the Play Store recently. Could you provide more background here? I believe this is a subject to proper profiling so that we can get an idea what's going on here.

@oney
Copy link
Author

oney commented Apr 21, 2016

android/app/src/main/AndroidManifest.xml

<application
  android:largeHeap="true"

Adding largeHeap seems fix it

@oney oney closed this as completed Apr 21, 2016
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants