Bug 43179 - Exception when using F# with Xamarin forms while showing an image
Summary: Exception when using F# with Xamarin forms while showing an image
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.1
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Paul DiPietro [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-08-08 19:14 UTC by Sam Williams
Modified: 2017-05-02 04:09 UTC (History)
2 users (show)

Tags: F#, Froms, Android
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 FIXED

Description Sam Williams 2016-08-08 19:14:20 UTC
Xamarin Forms, F#, Android
Xamarin Studio version 6.1 (build 5298)

the source code is here: https://github.com/willsam100/ImageSingle or to recreate:
display an image (either from embedded or Android's drawables, the source I have supplied uses Android) and show an image on screen. 

The following stacktrace is thrown when starting the app:
  at Xamarin.Forms.Platform.Android.ResourceManager.GetId (System.Type type, System.String propertyName) [0x0000d] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\ResourceManager.cs:65 
  at Xamarin.Forms.Platform.Android.ResourceManager.IdFromTitle (System.String title, System.Type type) [0x00007] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\ResourceManager.cs:59 
  at Xamarin.Forms.Platform.Android.ResourceManager.GetBitmapAsync (Android.Content.Res.Resources resource, System.String name) [0x00000] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\ResourceManager.cs:26 
  at Xamarin.Forms.Platform.Android.FileImageSourceHandler+<LoadImageAsync>d__4.MoveNext () [0x000c6] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\FileImageSourceHandler.cs:23 
[MVID] e3d80a9502b84521b638fbb10cce4a8a 0,1,2,3
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
  at Xamarin.Forms.Platform.Android.ImageRenderer+<UpdateBitmap>d__8.MoveNext () [0x000fe] in C:\BuildAgent\work\aad494dc9bc9783\Xamarin.Forms.Platform.Android\Renderers\ImageRenderer.cs:86 
[MVID] bd286ccd2dcb40a2ab0cf2f472b25b51 0,1,2,3,4
[MVID] e3d80a9502b84521b638fbb10cce4a8a 5
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>m__0 (System.Object state) [0x00000] in /Users/builder/data/lanes/3511/b5fafb24/source/mono/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018 
  at Android.App.SyncContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Users/builder/data/lanes/3511/fdaf900a/source/xamarin-android/src/Mono.Android/Android.App/SyncContext.cs:18 
  at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in /Users/builder/data/lanes/3511/fdaf900a/source/xamarin-android/src/Mono.Android/Java.Lang/Thread.cs:36 
  at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in /Users/builder/data/lanes/3511/fdaf900a/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Java.Lang.IRunnable.cs:81 
  at (wrapper dynamic-method) System.Object:764524e7-b215-4f52-9d34-31a8d78b1ca8 (intptr,intptr)
[MVID] 505d3e7da6254b9aba5511937e5a0ded 2,3,4
[MVID] bd286ccd2dcb40a2ab0cf2f472b25b51 0,1
Comment 1 Paul DiPietro [MSFT] 2017-03-17 00:36:19 UTC
I don't appear able to reproduce this using the provided reproduction with the latest version of Forms/FSharp.Core on VS2017. Can you confirm whether this is still an issue before I otherwise close it, as I assume it has been resolved?
Comment 2 Sam Williams 2017-05-02 04:09:12 UTC
I have not had this problem again. I believe the Android type resource type provider has fixed this bug. It can be marked as fixed.