java.lang.OutOfMemoryError

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

Samebug tips4

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


rafaelrafael

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


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web623

  • via GitHub by ctodobom
    ,
  • via GitHub by AEFeinstein
    ,
  • Stack trace

    • java.lang.OutOfMemoryError: Failed to allocate a 37765132 byte allocation with 8290820 free bytes and 7MB until OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.Bitmap.nativeCreate(Native Method) at android.graphics.Bitmap.createBitmap(Bitmap.java:838) at android.graphics.Bitmap.createBitmap(Bitmap.java:815) at android.graphics.Bitmap.createBitmap(Bitmap.java:746) at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:622) at com.todobom.opennotescanner.FullScreenImageAdapter.instantiateItem(FullScreenImageAdapter.java:67) at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:870) at android.support.v4.view.ViewPager.populate(ViewPager.java:1054) at android.support.v4.view.ViewPager.populate(ViewPager.java:952) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1474) at android.view.View.measure(View.java:17565) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:727) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:463) at android.view.View.measure(View.java:17565) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:135) at android.view.View.measure(View.java:17565) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537) at android.support.v7.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:391) at android.view.View.measure(View.java:17565) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at android.view.View.measure(View.java:17565) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436) at android.widget.LinearLayout.measureVertical(LinearLayout.java:722) at android.widget.LinearLayout.onMeasure(LinearLayout.java:613) at android.view.View.measure(View.java:17565) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5537) at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2615) at android.view.View.measure(View.java:17565) at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2045) at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1196) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1409) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1084) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5990) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) at android.view.Choreographer.doCallbacks(Choreographer.java:580) at android.view.Choreographer.doFrame(Choreographer.java:550) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    filpgamefilpgame
    8 times, last one
    Aria PahlavanAria Pahlavan
    24 times, last one
    pranavprakashpranavprakash
    2 times, last one
    66 more bugmates