Bug 38072 - [Forms Android] Out of Memory when adding images to AbsoluteLayout
Summary: [Forms Android] Out of Memory when adding images to AbsoluteLayout
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.0.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rui Marinho
Depends on:
Reported: 2016-01-26 20:38 UTC by Matthew Regul
Modified: 2017-06-19 21:13 UTC (History)
8 users (show)

Tags: AbsoluteLayout Images OutOfMemory
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:

Description Matthew Regul 2016-01-26 20:38:23 UTC
== Overview: =============================================
Application is running out of memory when adding images to an AbsoluteLayout, regardless of image size. (46k image vs. 829k image)

Sample App (modified version) - https://gist.github.com/mattregul/f2ca40428937e87667e2#gistcomment-1680557
 - Includes a small and the original large image for testing
 - https://dl.dropboxusercontent.com/u/62849286/Cases/243277/ImageIssueMod.zip

Code Snips
 - App.cs (forms) - https://gist.github.com/mattregul/f2ca40428937e87667e2#file-app-cs
 - MainActivity.cs (Android, for screen size) - https://gist.github.com/mattregul/f2ca40428937e87667e2#file-mainactivity-cs-L17

== Steps to Reproduce: ===================================
Running the sample app with either small images (46k) or the larger images (829k) consumes all of the available memory, or runs poorly

== Actual Results: ======================================
App will with crash with an OOM error or run poorly.

== Build Date & Platform: ===============================
Version Info - https://gist.github.com/mattregul/f2ca40428937e87667e2#file-version-info-cs   

== Additional Information: ==============================
Profiler using a Large image - https://gist.github.com/mattregul/f2ca40428937e87667e2#gistcomment-1680514
 - BGHouse = 829k image
 - 287.8 MB Working Set
 - 287.9 MB Max
 - Code Snip - https://gist.github.com/mattregul/f2ca40428937e87667e2#file-app-cs-L39
 - Link to Large Image - https://dl.dropboxusercontent.com/u/62849286/Cases/243277/BGHouse.png

Profiler using a Small image - https://gist.github.com/mattregul/f2ca40428937e87667e2#gistcomment-1680515
 - BGHouseSmallerSize = 46k image
 - 287.4 MB Working Set
 - 288.1 MB Max
 - Code Snip - https://gist.github.com/mattregul/f2ca40428937e87667e2#file-app-cs-L49
 - Link to Large Image - https://dl.dropboxusercontent.com/u/62849286/Cases/243277/BGHouseSmallerSize.jpg

= = = = = = = = = = = = = = = = = = = = =
Additional details in private note below
Comment 2 Stephen 2016-02-10 16:23:42 UTC

Is there any update on the progress of this?

Comment 4 Chris King 2017-06-19 17:21:03 UTC
Assigned to you as you were last to request additional info.
Comment 5 Samantha Houts [MSFT] 2017-06-19 21:13:49 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!