java.lang.OutOfMemoryError

tip

For most cases,recommend that you use the Glide library to fetch, decode, and display bitmaps in your app. Glide abstracts out most of the complexity in handling these and other tasks related to working with bitmaps and other images on Android.

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

  • GitHub comment 32#244783512
    via GitHub by opendatakit-bot
    ,
  • GitHub comment 106#119753726
    via GitHub by mitchellsundt
    ,
  • Crashes on new "image tab"
    via GitHub by Lineflyer
    ,
    • java.lang.OutOfMemoryError: bitmap size exceeds VM budget at android.graphics.BitmapFactory.nativeDecodeStream(NativeMethod) at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:459) at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:271) at org.odk.collect.android.widgets.ImageWidget.buildView(ImageWidget.java:197) at org.odk.collect.android.widgets.WidgetFactory.createWidgetFromPrompt(WidgetFactory.java:86) at org.odk.collect.android.views.QuestionView.buildView(QuestionView.java:85) at org.odk.collect.android.activities.FormEntryActivity.createView(FormEntryActivity.java:494) at org.odk.collect.android.activities.FormEntryActivity.refreshCurrentView(FormEntryActivity.java:290) at org.odk.collect.android.activities.FormEntryActivity.onResume(FormEntryActivity.java:1049) at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149) at android.app.Activity.performResume(Activity.java:3763) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2937) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2965) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1889) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:123) at android.app.ActivityThread.main(ActivityThread.java:4363) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) at dalvik.system.NativeStart.main(Native Method)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    dmitrydmitry
    33 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    2 more bugmates