java.lang.OutOfMemoryError: Failed to allocate a 100436832 byte allocation with 4194304 free bytes and 42MB until OOM


Solutions on the web622

Solution icon of stackoverflow
Failed to allocate a 100436832 byte allocation with 4194304 free bytes and 42MB until OOM

Solution icon of stackoverflow
Failed to allocate a 80281612 byte allocation with 16777216 free bytes and 42MB until OOM

Solution icon of github
via GitHub by mathroule
, 5 months ago
Failed to allocate a 8294412 byte allocation with 4194304 free bytes and 7MB until OOM

Solution icon of stackoverflow
Failed to allocate a 51750048 byte allocation with 4194304 free bytes and 13MB until OOM

Solution icon of stackoverflow
via Stack Overflow by XXXMysteriXXX
, 1 year ago
Failed to allocate a 29178012 byte allocation with 4194304 free bytes and 20MB until OOM

Solution icon of stackoverflow
via Stack Overflow by anurag145
, 11 months ago
Failed to allocate a 74649612 byte allocation with 4194304 free bytes and 28MB until OOM

Solution icon of stackoverflow
via Stack Overflow by Conanap
, 1 year ago
Failed to allocate a 11287248 byte allocation with 4194304 free bytes and 5MB until OOM

Solution icon of stackoverflow
Failed to allocate a 35093260 byte allocation with 4194304 free bytes and 11MB until OOM

Solution icon of stackoverflow
Failed to allocate a 54000012 byte allocation with 4194304 free bytes and 11MB until OOM

Solution icon of stackoverflow
Failed to allocate a 182250012 byte allocation with 4194304 free bytes and 74MB until OOM

Stack trace

java.lang.OutOfMemoryError: Failed to allocate a 100436832 byte allocation with 4194304 free bytes and 42MB until OOM
	at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
	at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:609)
	at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
	at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1080)
	at android.content.res.Resources.loadDrawableForCookie(Resources.java:2635)
	at android.content.res.Resources.loadDrawable(Resources.java:2540)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:870)
	at android.widget.ImageView.<init>(ImageView.java:152)
	at android.widget.ImageView.<init>(ImageView.java:140)
	at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:57)
	at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:53)
	at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
	at android.support.v7.app.AppCompatDelegateImplV7.createView(AppCompatDelegateImplV7.java:1008)
	at android.support.v7.app.AppCompatDelegateImplV7.onCreateView(AppCompatDelegateImplV7.java:1067)
	at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:746)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
	at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280)
	at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)
	at com.example.sukumar.magzsam3.Main5Activity.onCreate(Main5Activity.java:13)
	at android.app.Activity.performCreate(Activity.java:6237)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)

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

Samebug visitor profile picture
Unknown user
Once, 1 year ago
6 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 1 year ago
76 more bugmates