question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OutOfMemoryError on android

See original GitHub issue
java.lang.OutOfMemoryError: 
 
  at dalvik.system.VMRuntime.newNonMovableArray (Native Method)
 
  at android.graphics.Bitmap.nativeCreate (Native Method)
 
  at android.graphics.Bitmap.createBitmap (Bitmap.java:975)
 
  at android.graphics.Bitmap.createBitmap (Bitmap.java:946)
 
  at android.graphics.Bitmap.createBitmap (Bitmap.java:913)
 
  at com.horcrux.svg.SvgViewShadowNode.drawOutput (SvgViewShadowNode.java:130)
 
  at com.horcrux.svg.SvgViewShadowNode.onCollectExtraUpdates (SvgViewShadowNode.java:120)
 
  at com.facebook.react.uimanager.ReactShadowNodeImpl.dispatchUpdates (ReactShadowNodeImpl.java:411)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:968)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:959)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:959)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:959)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:959)
 
  at com.facebook.react.uimanager.UIImplementation.applyUpdatesRecursive (UIImplementation.java:959)
 
  at com.facebook.react.uimanager.UIImplementation.updateViewHierarchy (UIImplementation.java:700)
 
  at com.facebook.react.uimanager.UIImplementation.dispatchViewUpdates (UIImplementation.java:654)
 
  at com.facebook.react.uimanager.UIManagerModule.onBatchComplete (UIManagerModule.java:665)
 
  at com.facebook.react.bridge.NativeModuleRegistry.onBatchComplete (NativeModuleRegistry.java:134)
 
  at com.facebook.react.bridge.CatalystInstanceImpl$BridgeCallback.onBatchComplete (CatalystInstanceImpl.java:145)
 
  at com.facebook.react.bridge.queue.NativeRunnable.run (Native Method)
 
  at android.os.Handler.handleCallback (Handler.java:739)
 
  at android.os.Handler.dispatchMessage (Handler.java:95)
 
  at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage (MessageQueueThreadHandler.java:29)
 
  at android.os.Looper.loop (Looper.java:148)
 
  at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run (MessageQueueThreadImpl.java:192)
 
  at java.lang.Thread.run (Thread.java:818)

#518

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:13

github_iconTop GitHub Comments

2reactions
jfr3000commented, Oct 16, 2018

Same problem here, I have a list of SVG elements (a chart), and memory usage shoots up when the list gets rendered - and the memory is never released, even after the chart component is unmounted, which is the actual problem for me. I’ve tried an example without any event listeners or closures, so those can’t be the reason for the memory being retained. The minimal example is a FlatList with 300 small SVG circles.

0reactions
msandcommented, Dec 9, 2018

Closing this as the cause is most likely svg elements which are much bigger than the screen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve java.lang.OutOfMemoryError trouble in Android
If you are getting this Error java.lang.OutOfMemoryError this is the most common problem occurs in Android. This ...
Read more >
OutOfMemoryError - Android Developers
OutOfMemoryError objects may be constructed by the virtual machine as if writable. ... Constructs an OutOfMemoryError with no detail message.
Read more >
Practical Guide To Solve OutOfMemoryError in Android ...
In this blog, we will learn how to solve OutOfMemoryError in Android application. There can be many reasons for OutOfMemoryError in Android.
Read more >
Fixing Memory Leaks in Android - OutOfMemoryError
Open Android Studio, open the Android Monitor tab. · Run your application, and select it from the list of available apps. · Do...
Read more >
HOW TO DIAGNOSE OUTOFMEMORYERROR IN ANDROID?
First step is to capture heap dumps from the android app. Heap Dump is a snapshot of memory, which contains information about the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found