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.
Created attachment 4304 [details]
Zipped VS solution containing a reproduction.
GetRunTimeMethod in RuntimeReflectionExtions when used from a Profile78 PCL crashes the app when run from a debugger, and freezes when run without the debugger.
It seems to produce a stackoverflow exception. Every method in RuntimeReflectionExtensions looks like this:
public static IEnumerable<PropertyInfo> GetRuntimeProperties (this Type type)
return type.GetRuntimeProperties ();
Which obviously produces a stackoverflow exception. It is very easy to reproduce with any kind of those methods.
What about this solution:
private IEnumerable<PropertyInfo> GetAllProperties(Type type)
var properties = type.GetTypeInfo().DeclaredProperties.ToList();
var baseType = type.GetTypeInfo().BaseType;
if (baseType != typeof (object))
var baseProperties = GetAllProperties(baseType);
The above workaround works well but when it comes to use the overloaded method GetMethodInfo(Delegate) it still produces a stackoverflow.
E.g. try to call GetMethodInfo on an Action
This is really a serious bug which affects many usages. Could anyone please comment on that when it's gonna be fixed? In this state we cannot work anymore.
Ran into this issue calling:
var info = engine.update2.GetMethodInfo();
where update2 is:
public Action<float> update2;
sfx = new Dictionary<string, SoundEffect>();
update2 = NoUpdate;
void NoUpdate(float update_dt)
RuntimeReflectionExtension.GetRuntimeMethod returns nothing in latest Xamarin version. It seems that the PCL bindings are not implemented at all.
The PCL compiles fine, but when used from monodroid it returns an empty list.
.GetTypeInfo().DeclaredMethods don't work either.
I can confirm this is happening using PCL Profile49 as well, GetRuntimeMethod() and GetRuntimeMethods() both return null. I've worked around it by using type.GetTypeInfo ().GetDeclaredMethod (methodName);
Running Alpha channel: Studio v 4.3.0, Xamarin.iOS v 22.214.171.124
Should be fixed in Xamarin.Android 4.14 (or earlier?).