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.
The following issue can be reproduced with the following: https://github.com/thedillonb/XamarinTargetNull
Code that was originally working in 7.2.0 is now broken in 7.2.1 due to a "Non-Static method requires a target" issue that arises with nullable objects.
The code example attempts to JSON serialize a nullable object using a previously working SimpleJSON library (single .cs file - also attached). The SimpleJSON library does extensive Expression handling, but for what ever reason, leaves me with a "Non-static method requires a target" exception.
Before being quick to blame the SimpleJson library it should be noted that it works on all other platforms.
Marek, it looks like this is related to the new interpreter support:
Unhandled managed exception: Non-static method requires a target. (System.Reflection.TargetException)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object parameters, System.Globalization.CultureInfo culture) [0x0006b] in /work/monotouch/master/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:243
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object parameters) [0x00000] in /work/monotouch/master/mono/mcs/class/corlib/System.Reflection/MethodBase.cs:114
at Microsoft.Scripting.Interpreter.MethodInfoCallInstruction.InvokeWorker (System.Object args) [0x00030] in /work/monotouch/7.2.1/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/CallInstruction.cs:268
at Microsoft.Scripting.Interpreter.MethodInfoCallInstruction.Invoke (System.Object args) [0x00000] in /work/monotouch/7.2.1/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/CallInstruction.cs:239
at Microsoft.Scripting.Interpreter.MethodInfoCallInstruction.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x0003b] in /work/monotouch/7.2.1/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Instructions/CallInstruction.cs:289
at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x0001b] in /work/monotouch/7.2.1/mono/mcs/class/dlr/Runtime/Microsoft.Dynamic/Interpreter/Interpreter.cs:126
Fixed in Mono master
Any idea when this will hit a stable Xamarin.iOS release?
@Dillon, at the moment no, but it usually takes between a month or two.
I can confirm this error also occurs with Json.Net in the same scenario. It is still broken in 188.8.131.52.
I am surprised that something as important as this bug fix would take a month or two to make it into the stable release. You're requiring everyone to jump onto alpha/beta?
I can also confirm that it is not fixed in the beta channel 184.108.40.206 but is fixed in the alpha channel 220.127.116.11.