java.lang.OutOfMemoryError: Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM

GitHub | ctodobom | 1 year ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    Image viewer Out of Memory error

    GitHub | 1 year ago | ctodobom
    java.lang.OutOfMemoryError: Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM
  2. 0
    samebug tip
    Try adding these lines to your manifest: "android:hardwareAccelerated="false"" and "android:largeHeap="true"" as it seems to work for some cases. See also this article about handling bitmaps on android's documentation: https://goo.gl/8LVrzp
  3. 0

    App crashes with OutOfMemory issue

    GitHub | 3 weeks ago | snchitnis
    java.lang.OutOfMemoryError: Failed to allocate a 7755276 byte allocation with 4194208 free bytes and 5MB until OOM
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    OutOfMemoryError on ObservationViewerActivity

    GitHub | 1 year ago | kueda
    java.lang.OutOfMemoryError: Failed to allocate a 38937612 byte allocation with 16777216 free bytes and 35MB until OOM
  6. 0
    samebug tip
    When you use findViewById inside an activity it is going to look for a View inside your main_activity.xml. If it's not there, it throws this exception, try to use the right view to call findviewById.

    2 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM

      at dalvik.system.VMRuntime.newNonMovableArray()
    2. Android Platform
      Bitmap.createScaledBitmap
      1. dalvik.system.VMRuntime.newNonMovableArray(Native Method)
      2. android.graphics.Bitmap.nativeCreate(Native Method)
      3. android.graphics.Bitmap.createBitmap(Bitmap.java:838)
      4. android.graphics.Bitmap.createBitmap(Bitmap.java:815)
      5. android.graphics.Bitmap.createBitmap(Bitmap.java:746)
      6. android.graphics.Bitmap.createScaledBitmap(Bitmap.java:622)
      6 frames
    3. com.todobom.opennotescanner
      FullScreenImageAdapter.instantiateItem
      1. com.todobom.opennotescanner.FullScreenImageAdapter.instantiateItem(FullScreenImageAdapter.java:67)
      1 frame
    4. Android Support v4
      ViewPager.onMeasure
      1. android.support.v4.view.ViewPager.addNewItem(ViewPager.java:870)
      2. android.support.v4.view.ViewPager.populate(ViewPager.java:1054)
      3. android.support.v4.view.ViewPager.populate(ViewPager.java:952)
      4. android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474)
      4 frames
    5. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17565)
      2. android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727)
      3. android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463)
      4. android.view.View.measure(View.java:17565)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      6. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      6 frames
    6. Android v7
      ContentFrameLayout.onMeasure
      1. android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135)
      1 frame
    7. Android Platform
      ViewGroup.measureChildWithMargins
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      2 frames
    8. Android v7
      ActionBarOverlayLayout.onMeasure
      1. android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391)
      1 frame
    9. Android Platform
      FrameLayout.onMeasure
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      3. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      4. android.view.View.measure(View.java:17565)
      5. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      6. android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
      7. android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
      8. android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
      9. android.view.View.measure(View.java:17565)
      10. android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537)
      11. android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
      11 frames
    10. Android
      PhoneWindow$DecorView.onMeasure
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2615)
      1 frame
    11. Android Platform
      ActivityThread.main
      1. android.view.View.measure(View.java:17565)
      2. android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2045)
      3. android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1196)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1409)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      9. android.view.Choreographer.doFrame(Choreographer.java:550)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      11. android.os.Handler.handleCallback(Handler.java:739)
      12. android.os.Handler.dispatchMessage(Handler.java:95)
      13. android.os.Looper.loop(Looper.java:135)
      14. android.app.ActivityThread.main(ActivityThread.java:5343)
      14 frames
    12. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    13. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
      2 frames