Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
I updated Xamarin to version 188.8.131.5274 and now i am having the same issue as:
was this issue re-introduced in this release?
I have a list view in a tabbedpage and loads it with images and text, no issue
when loaded with small images (320x320), but as soon as i add larger images
taking from my samsung tablet my application crashes at the 3rd reload. This is
frustrating, as i was about to release my app after lengthy development and
extensive testing with no issues until i upgraded Xamarin.
I not able to reproduce this on my Google Nexus 5 on 6374 or the latest master branch. Is there a specific device you're using?
Any Suggestions? Any Comments? Any one is checking this one out?
I have been able to reproduce this issue on a Galaxy Nexus and an HTC One M9. I've also tested on Forms 184.108.40.20678-pre2.
### Steps to reproduce
1) Download sample app provided in private comment 3
2) Run the app on a real device
3) Add images by clicking the '+' button in the lower left corner of the app (3 or 4 images is enough)
### Expected results
Images are added successfully
### Actual results
After third or fourth picture is added to the same category, I get an OutOfMemory exception (full error messages here: https://gist.github.com/amaliasafer/702b27c92bc17f943647)
### Additional information
=== Xamarin Studio ===
Version 5.9.4 (build 5)
Installation UUID: 1f52eea2-a387-4a2c-96c1-4637c8f8567a
Mono 4.0.2 ((detached/c99aa0c)
GTK+ 2.24.23 (Raleigh theme)
Package version: 400020005
=== Apple Developer Tools ===
Xcode 7.0 (8163.8)
=== Xamarin.Android ===
Version: 220.127.116.11 (Enterprise Edition)
Android SDK: /Users/amalias/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.4 (API level 19)
5.0 (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
=== Xamarin Android Player ===
Version: Unknown version
Location: /Applications/Xamarin Android Player.app
=== Xamarin.iOS ===
Version: 18.104.22.168 (Enterprise Edition)
Build date: 2015-06-30 15:19:13-0400
=== Xamarin.Mac ===
Version: 22.214.171.124 (Enterprise Edition)
=== Build Information ===
Release ID: 509040005
Git revision: 8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b
Build date: 2015-06-08 16:52:06-04
Xamarin addins: 7e93e9c3503f28770f23ce1b7eafd829919f18e8
=== Operating System ===
Mac OS X 10.10.3
Darwin amalias.local 14.3.0 Darwin Kernel Version 14.3.0
Mon Mar 23 11:59:05 PDT 2015
I have this problem in a list view with images on 1.5.1
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x00028>
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (object) <0x0003f>
at Android.App.SyncContext/<Post>c__AnonStorey0.<>m__0 () <0x00027>
at Java.Lang.Thread/RunnableImplementor.Run () <0x0003f>
at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x0003b>
at (wrapper dynamic-method) object.b49ee73e-d2e1-4d87-89ba-f534f44bf877 (intptr,intptr) <0x0003b>
--- End of managed exception stack trace ---
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at dalvik.system.NativeStart.run(Native Method)
Can anyone post a public repro?
From a previous private comment. Closing this issue.
The reason for this crash is not a bug in Xamarin.Forms, but rather how Android handles images and scaling through the BitmapFactory. You can see in the sample from comment #3 that the images are not scaled and only live in the drawable folder. There should be corresponding images in the other drawable folders (drawable-hdpi, drawable-xhdpi and drawable-xxhdpi folders. ).
Android recommends that the images are scaled and loaded into the correct size of the UI component. The easiest way to have the Android operating system handle this for you is to provide the appropriate sized images to the drawable, drawable-hdpi, drawable-xhdpi and drawable-xxhdpi folders.
This is covered in the Google Android documentation:
Supporting Multiple Screens:
Loading Large Bitmaps Efficiently: