Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Java Out of Memory Exception

$
0
0

I'm testing an app on an LG phone. I am getting a Java Out of Memory Exception. The error is shown below. I literally have 7 images that are relatively small (100x100) loaded at this point in time. I have an imagebutton for Xamarin Forms Labs that I am using as well. 7 buttons with each one loading an image. The LG phone is the only phone we have that is showing this error message. I've got the app running on my Nexus 9 tablet, a Samsung Tab 4, and another phone I can't remember the name of. Is there some kind of setting I should set in the project to increase a setting somewhere?

Java.Lang.OutOfMemoryError: Failed to allocate a 2176012 byte allocation with 1883024 free bytes and 1838KB until OOM
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/2058/58099c53/source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
at Android.Runtime.JNIEnv.CallStaticObjectMethod (intptr,intptr,Android.Runtime.JValue*) [0x00064] in /Users/builder/data/lanes/2058/58099c53/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1301
at Android.Graphics.Bitmap.CreateBitmap (int,int,Android.Graphics.Bitmap/Config) [0x0006c] in /Users/builder/data/lanes/2058/58099c53/source/monodroid/src/Mono.Android/platforms/android-22/src/generated/Android.Graphics.Bitmap.cs:715
at at Xamarin.Forms.Platform.Android.ButtonDrawable.CreateBitmap (bool,int,int)
at at Xamarin.Forms.Platform.Android.ButtonDrawable.Draw (Android.Graphics.Canvas)
at Android.Graphics.Drawables.Drawable.n_Draw_Landroid_graphics_Canvas_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/2058/58099c53/source/monodroid/src/Mono.Android/platforms/android-22/src/generated/Android.Graphics.Drawables.Drawable.cs:1382
at at (wrapper dynamic-method) object.12c56dda-abce-4468-8294-5e5263942ddd (intptr,intptr,intptr)
at --- End of managed exception stack trace ---
at java.lang.OutOfMemoryError: Failed to allocate a 2176012 byte allocation with 1883024 free bytes and 1838KB until OOM
at at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at at android.graphics.Bitmap.nativeCreate(Native Method)
at at android.graphics.Bitmap.createBitmap(Bitmap.java:817)
at at android.graphics.Bitmap.createBitmap(Bitmap.java:794)
at at android.graphics.Bitmap.createBitmap(Bitmap.java:761)
at at md5282f1122c1313907b9bf274dd2c2f344.ButtonDrawable.n_draw(Native Method)
at at md5282f1122c1313907b9bf274dd2c2f344.ButtonDrawable.draw(ButtonDrawable.java:49)
at at android.view.View.getDrawableRenderNode(View.java:15445)
at at android.view.View.drawBackground(View.java:15396)
at at android.view.View.draw(View.java:15162)
at at android.view.View.updateDisplayListIfDirty(View.java:14096)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.draw(View.java:15174)
at at android.widget.FrameLayout.draw(FrameLayout.java:592)
at at android.widget.ScrollView.draw(ScrollView.java:1722)
at at md5282f1122c1313907b9bf274dd2c2f344.ScrollViewRenderer.n_draw(Native Method)
at at md5282f1122c1313907b9bf274dd2c2f344.ScrollViewRenderer.draw(ScrollViewRenderer.java:97)
at at android.view.View.updateDisplayListIfDirty(View.java:14096)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.draw(View.java:15174)
at at android.view.View.updateDisplayListIfDirty(View.java:14096)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.updateDisplayListIfDirty(View.java:14091)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.draw(View.java:15174)
at at com.android.internal.widget.ActionBarOverlayLayout.draw(ActionBarOverlayLayout.java:501)
at at android.view.View.updateDisplayListIfDirty(View.java:14096)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.View.draw(View.java:14895)
at at android.view.ViewGroup.drawChild(ViewGroup.java:3405)
at at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3199)
at at android.view.View.draw(View.java:15174)
at at android.widget.FrameLayout.draw(FrameLayout.java:592)
at at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2695)
at at android.view.View.updateDisplayListIfDirty(View.java:14096)
at at android.view.View.getDisplayList(View.java:14119)
at at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:266)
at at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:272)
at at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:311)
at at android.view.ViewRootImpl.draw(ViewRootImpl.java:2531)
at at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2367)
at at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1998)
at at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1078)
at at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5875)
at at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
at at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at at android.view.Choreographer.doFrame(Choreographer.java:550)
at at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at at android.os.Handler.handleCallback(Handler.java:739)
at at android.os.Handler.dispatchMessage(Handler.java:95)
at at android.os.Looper.loop(Looper.java:135)
at at android.app.ActivityThread.main(ActivityThread.java:5297)
at at java.lang.reflect.Method.invoke(Native Method)
at at java.lang.reflect.Method.invoke(Method.java:372)
at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>