Bug 30835 (Out_of_memory) - Navigating to and from the Carousel page with MasterDetail page creates an Out of memory exception
Summary: Navigating to and from the Carousel page with MasterDetail page creates an Ou...
Status: VERIFIED FIXED
Alias: Out_of_memory
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 1.4.4
Hardware: PC Windows
: Normal major
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2015-06-05 05:55 UTC by Yeahpoint
Modified: 2015-07-17 14:03 UTC (History)
8 users (show)

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


Attachments
Carousel out of memory (48 bytes, text/plain)
2015-06-08 07:36 UTC, Yeahpoint
Details


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:
VERIFIED FIXED

Description Yeahpoint 2015-06-05 05:55:51 UTC
I have created a xamarin project with forms. Where I use the MasterDetail page class to navigate to the different pages in the application. My Homepage is a Carousel page that loud 3-4 image. When I navigate back to the homepage I get the following message:
[dalvikvm-heap] Grow heap (frag case) to 30.969MB for 8305932-byte allocation

every subsequent navigate back to the Homepage (Carousel Page) increases the Heap size. the size of the increment is dependent on the number of images I load into the carousel page.

After 4 or 5 navigation actions I receive the following exception:

[MonoDroid] Java.Lang.OutOfMemoryError: Exception of type 'Java.Lang.OutOfMemoryError' was thrown.
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x0004b>
[MonoDroid] at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (object) <IL 0x00006, 0x0003b>
[MonoDroid] at Android.App.SyncContext/<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Android.App/SyncContext.cs:18
[MonoDroid] at Java.Lang.Thread/RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/src/Java.Lang/Thread.cs:36
[MonoDroid] at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) [0x00009] in /Users/builder/data/lanes/monodroid-mavericks-monodroid-5.1-series/d419c934/source/monodroid/src/Mono.Android/platforms/android-21/src/generated/Java.Lang.IRunnable.cs:71
[MonoDroid] at (wrapper dynamic-method) object.d9739b70-6ef3-4aef-ac57-bdd7fa5679b5 (intptr,intptr) <IL 0x00011, 0x0001f>
[MonoDroid]   --- End of managed exception stack trace ---
[MonoDroid] java.lang.OutOfMemoryError
[MonoDroid] 	at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
[MonoDroid] 	at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:594)
[MonoDroid] 	at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:429)
[MonoDroid] 	at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:452)
[MonoDroid] 	at android.graphics.BitmapFactory.decodeResource(BitmapFactory.java:482)
[MonoDroid] 	at dalvik.system.NativeStart.run(Native Method)
[AndroidRuntime] Shutting down VM
[dalvikvm-heap] Clamp target GC heap from 99.873MB to 96.000MB
[dalvikvm-heap] Forcing collection of SoftReferences for 8305932-byte allocation
[dalvikvm-heap] Clamp target GC heap from 99.873MB to 96.000MB
[dalvikvm-heap] Out of memory on a 8305932-byte allocation.
[skia] --- allocation failed for scaled bitmap
[skia] --- allocation failed for scaled bitmap
Comment 1 Stephane Delcroix 2015-06-05 10:38:31 UTC
Thank you for taking the time to submit the bug. If you could please attach a reproduction to the bug by starting with a clean Xamarin.Forms project and adding just the code necessary to demonstrate the issue we would very much appreciate it.

Warm regards,
Xamarin Forms Team
Comment 2 Yeahpoint 2015-06-08 07:36:11 UTC
Created attachment 11503 [details]
Carousel out of memory
Comment 3 Yeahpoint 2015-06-08 07:38:36 UTC
Comment on attachment 11503 [details]
Carousel out of memory

I have created a new Forms project using a masterDetailsPage to navigate between pages. If you navigate to and from the carousel page a few times an out of memory exception is thrown.
Comment 4 Yeahpoint 2015-06-10 05:51:26 UTC
status changed
Comment 5 Niels 2015-06-20 10:53:21 UTC
Same problem on Windows Phone: out of memory exception if more than 6 or 7 pages in CarouselPage (depending on the page size).

Also see: https://forums.xamarin.com/discussion/41970/carousel-pages-and-memory
Comment 6 Jason Smith [MSFT] 2015-06-26 03:48:22 UTC
Should be fixed in 1.4.4-pre1
Comment 7 Parmendra Kumar 2015-07-17 14:03:46 UTC
I have checked this issue with X.F 1.4.4-pre2 and its working fine at my end.

hence closing this issue.