Bug 33456 - (Out_of_memory) Continuously Changing Detail page in MasterDetail page creates an Out of memory exception
Summary: (Out_of_memory) Continuously Changing Detail page in MasterDetail page create...
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.4
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-28 09:15 UTC by Arbab
Modified: 2016-04-13 19:28 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Arbab 2015-08-28 09:15:12 UTC
I have created a xamarin project with forms. Where I have created a custom Tabbar in which I am changing the Detail page when any tab button is tapped using the MasterDetail page. After changing this.Detail = myPage three to four times I get
the following message and application is crashed:

[Mono] GC_OLD_BRIDGE num-objects 1715 num_hash_entries 1851 sccs size 1851 init 0.00ms df1 2.23ms sort 0.37ms dfs2 0.68ms setup-cb 0.82ms free-data 1.19ms links 138/138/137/1 dfs passes 3704/1989
[Mono] GC_MAJOR: (LOS overflow) pause 30.40ms, total 30.50ms, bridge 56.52ms major 5504K/4992K los 165K/11852K
[Choreographer] Skipped 120 frames!  The application may be doing too much work on its main thread.
[dalvikvm-heap] Grow heap (frag case) to 116.928MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 119.876MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 121.163MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 122.449MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 123.735MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 125.022MB for 1255984-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 153.372MB for 2674960-byte allocation
[dalvikvm-heap] Grow heap (frag case) to 154.683MB for 1197520-byte allocation
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[Mono] GC_OLD_BRIDGE num-objects 534 num_hash_entries 58606 sccs size 22656 init 0.00ms df1 126.26ms sort 24.85ms dfs2 55.00ms setup-cb 4.80ms free-data 107.25ms links 103492/103492/661111/31 dfs passes 162632/126148
[Mono] GC_MINOR: (Nursery full) pause 143.61ms, total 143.69ms, bridge 241.43ms promoted 48K major 5552K los 2026K
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[skia] --- SkImageDecoder::Factory returned null
[Choreographer] Skipped 113 frames!  The application may be doing too much work on its main thread.
[dalvikvm-heap] Clamp target GC heap from 195.440MB to 192.000MB
[dalvikvm-heap] Clamp target GC heap from 197.988MB to 192.000MB
[dalvikvm-heap] Forcing collection of SoftReferences for 1243168-byte allocation
[dalvikvm-heap] Clamp target GC heap from 197.988MB to 192.000MB
[dalvikvm-heap] Out of memory on a 1243168-byte allocation.
[Mono] DllImport attempting to load: '/system/lib/liblog.so'.
[Mono] DllImport loaded library '/system/lib/liblog.so'.
[Mono] DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
[Mono] Searching for '__android_log_print'.
[Mono] Probing '__android_log_print'.
[Mono] Found as '__android_log_print'.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Java.Lang.OutOfMemoryError: Exception of type 'Java.Lang.OutOfMemoryError' was thrown.
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/1978/f98871a9/source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61
[MonoDroid] at Android.Runtime.JNIEnv.CallStaticObjectMethod (intptr,intptr,Android.Runtime.JValue*) [0x00064] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1301
[MonoDroid] at Android.Graphics.Bitmap.CreateBitmap (int,int,Android.Graphics.Bitmap/Config) [0x0006c] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/platforms/android-22/src/generated/Android.Graphics.Bitmap.cs:715
[MonoDroid] at Xamarin.Forms.Platform.Android.FrameRenderer/FrameDrawable.CreateBitmap (bool,int,int) <IL 0x00009, 0x000af>
[MonoDroid] at Xamarin.Forms.Platform.Android.FrameRenderer/FrameDrawable.Draw (Android.Graphics.Canvas) <IL 0x0007e, 0x003a7>
[MonoDroid] at Android.Graphics.Drawables.Drawable.n_Draw_Landroid_graphics_Canvas_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/platforms/android-22/src/generated/Android.Graphics.Drawables.Drawable.cs:1382
[MonoDroid] at (wrapper dynamic-method) object.6ccdb139-34a6-48bc-b837-20ec9f34f393 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] java.lang.OutOfMemoryError
[MonoDroid] 	at android.graphics.Bitmap.nativeCreate(Native Method)
[MonoDroid] 	at android.graphics.Bitmap.createBitmap(Bitmap.java:809)
[MonoDroid] 	at android.graphics.Bitmap.createBitmap(Bitmap.java:786)
[MonoDroid] 	at android.graphics.Bitmap.createBitmap(Bitmap.java:753)
[MonoDroid] 	at md5530bd51e982e6e7b340b73e88efe666e.FrameRenderer_FrameDrawable.n_draw(Native Method)
[MonoDroid] 	at md5530bd51e982e6e7b340b73e88efe666e.FrameRenderer_FrameDrawable.draw(FrameRenderer_FrameDrawable.java:49)
[MonoDroid] 	at android.view.View.draw(View.java:14450)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13362)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13357)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13357)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.widget.ListView.drawChild(ListView.java:3363)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.widget.AbsListView.dispatchDraw(AbsListView.java:2458)
[MonoDroid] 	at android.widget.ListView.dispatchDraw(ListView.java:3358)
[MonoDroid] 	at android.view.View.draw(View.java:14468)
[MonoDroid] 	at android.widget.AbsListView.draw(AbsListView.java:3817)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13362)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.draw(View.java:14468)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13362)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13357)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.draw(View.java:14468)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13362)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13357)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13357)
[MonoDroid] 	at android.view.View.getDisplayList(View.java:13404)
[MonoDroid] 	at android.view.View.draw(View.java:14182)
[MonoDroid] 	at android.view.ViewGroup.drawChild(ViewGroup.java:3103)
[MonoDroid] 	at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2940)
[MonoDroid] 	at android.view.View.draw(View.java:14468)


Solution Applied:
Increase Heap Size for Android to 2G but still facing this issue as heap size is increased but app size is increasing continuously and crashed.

Note: I am not using or decoding any kind of images. (In many solutions it is suggested you are using big size bitmaps so exception is thrown at decoding)
Comment 1 Chris King 2016-01-21 20:28:06 UTC
Arbab, thanks for reporting this issue. We couldn't reproduce the failure. Could you please attach a reproduction?
Comment 2 Paul DiPietro [MSFT] 2016-04-13 19:28:10 UTC
Thank you for your bug report. As we have not received the information requested, we cannot properly triage your bug and are marking it resolved.

Warm regards,
Xamarin Forms Team