|Summary:||MissingMethodException when accessing IsTransient property on an object of type Exception.|
|Severity:||normal||CC:||jas, jimmy.garrido, paul.dipietro|
|Tags:||Is this bug a regression?:||---|
|Last known good build:|
|Attachments:||Codebehind for the MainPage class in a default Xamarin.Forms PCL project|
Description murat 2017-09-11 16:30:29 UTC
Happens on Xamarin.Forms v126.96.36.1990 when executing the statement obj.GetType().GetRuntimeProperties().Select(prop => prop.GetValue(obj))) where obj is an Exception object. When the variable prop contains information about IsTransient property, GetValue() throws a MissingMethodException on Android. There's no such problem in iOS or UWP project.
Comment 1 murat 2017-09-11 16:36:05 UTC
Tried downgrading a few versions. Still happens in v188.8.131.52.
Comment 2 Jimmy [MSFT] 2017-09-12 16:31:58 UTC
I'm wondering if this is actually an issue with the Xamarin.Android API instead of Xamarin.Forms since it does not happen with the other platforms. Can you attach a minimal project that reproduces the crash so we can investigate further? When providing the project, please set the report's status back to NEW otherwise we may close this issue after a period no response. Thanks!
Comment 3 murat 2017-09-14 16:04:46 UTC
Created attachment 24751 [details] Codebehind for the MainPage class in a default Xamarin.Forms PCL project
Comment 4 murat 2017-09-14 16:06:24 UTC
Comment 5 Paul DiPietro [MSFT] 2017-09-19 19:57:55 UTC
Using that code, it appears that exception is raised on both iOS as well as Android on my machine. UWP does not hit it in this case. Could you provide more info on the version(s) of Android where the issue doesn't occur for you, as well as some of your version information? I do agree with Jimmy that it's possible (if not likely) that this is not specifically a Forms issue.
Comment 6 murat 2017-10-03 17:28:23 UTC
I mainly use a Samsung Galaxy S6 with Android 7.0 for testing, which throws the exception when running this code. I haven't tested other Android devices/versions.
Comment 7 Paul DiPietro [MSFT] 2017-12-04 16:27:34 UTC
As no further reports on this have been made for some time we are led to believe that this not specifically a Forms issue. If there is a reproduction which can be made that more clearly illustrates a Forms-specific issue, please reopen this with one, assuming the problem occurs as of the latest 2.5.0 stable release (as well as an updated VS). I might also suggest raising a Xamarin.Android issue per comment #2, in such a case. Guidelines for creating reproductions are available at: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Bug-Reports