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 4383 [details]
Solution to reproduce
Xamarin Studio 4.0.10 (build 5)
Json Serialization (ServiceStack) works fine on the simulator but throw a NULL Exception on the device only.
Also, the bug occurs when i try to just serialize a Dictionnary.
It's just a limitation.
Most of the limitations on value-types were removed in 6.3.x so it might not be invalid.
The full exception is:
System.NullReferenceException: Object reference not set to an instance of an object
at ServiceStack.Text.Common.ToStringDictionaryMethods`3[System.Int32,XamarinBug.CategoryStat,ServiceStack.Text.Json.JsonTypeSerializer].WriteGenericIDictionary (System.IO.TextWriter writer, IDictionary`2 map, ServiceStack.Text.Common.WriteObjectDelegate writeKeyFn, ServiceStack.Text.Common.WriteObjectDelegate writeValueFn) [0x00000] in <filename unknown>:0
at at (wrapper unknown) object:gsharedvt_in ()
at at (wrapper unknown) object:gsharedvt_out ()
at ServiceStack.Text.Common.ToStringDictionaryMethods`3[System.Int32,XamarinBug.CategoryStat,ServiceStack.Text.Json.JsonTypeSerializer].WriteIDictionary (System.IO.TextWriter writer, System.Object oMap, ServiceStack.Text.Common.WriteObjectDelegate writeKeyFn, ServiceStack.Text.Common.WriteObjectDelegate writeValueFn) [0x00000] in <filename unknown>:0
at at (wrapper delegate-invoke) <Module>:invoke_void__this___TextWriter_object_WriteObjectDelegate_WriteObjectDelegate (System.IO.TextWriter,object,ServiceStack.Text.Common.WriteObjectDelegate,ServiceStack.Text.Common.WriteObjectDelegate)
at ServiceStack.Text.Common.JsWriter`1+<GetCoreWriteFn>c__AnonStorey22`1[ServiceStack.Text.Json.JsonTypeSerializer,System.Collections.Generic.Dictionary`2[System.Int32,XamarinBug.CategoryStat]].<>m__5B (System.IO.TextWriter w, System.Object x) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.WriteType`2[XamarinBug.Stats,ServiceStack.Text.Json.JsonTypeSerializer].WriteProperties (System.IO.TextWriter writer, System.Object value) [0x00000] in <filename unknown>:0
at ServiceStack.Text.Common.WriteType`2[XamarinBug.Dummy,ServiceStack.Text.Json.JsonTypeSerializer].WriteProperties (System.IO.TextWriter writer, System.Object value) [0x00000] in <filename unknown>:0
at ServiceStack.Text.JsonSerializer.SerializeToString (System.Object value, System.Type type) [0x00000] in <filename unknown>:0
at XamarinBug.XamarinBugViewController.ViewDidLoad () [0x0000d] in /Users/sebastienpouliot/Downloads/XamarinBug/XamarinBug/XamarinBugViewController.cs:30
at at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSend (intptr,intptr)
at MonoTouch.UIKit.UIWindow.MakeKeyAndVisible () [0x00010] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIWindow.g.cs:129
at XamarinBug.AppDelegate.FinishedLaunching (MonoTouch.UIKit.UIApplication app, MonoTouch.Foundation.NSDictionary options) [0x00032] in /Users/sebastienpouliot/Downloads/XamarinBug/XamarinBug/AppDelegate.cs:31
at at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication:UIApplicationMain (int,string,intptr,intptr)
at MonoTouch.UIKit.UIApplication.Main (System.String args, System.String principalClassName, System.String delegateClassName) [0x0004c] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:38
at XamarinBug.Application.Main (System.String args) [0x00001] in /Users/sebastienpouliot/Downloads/XamarinBug/XamarinBug/Main.cs:17
Zoltan, with -gsharedvt=false we get the "old" ExecutionEngineException, otherwise this NRE (tested with 6.4, not master).
Its either a gsharedvt problem, or a bug in the app/class libs which didn't happen before because of the ExecutionEngineException.
It works fine with the simulator, so the library is unlikely to be the issue.
Also the linker is disabled in both cases, nothing should be missing.
Fixed in mono-extensions f722a3141924c0dee906d2dc143905af338ad6e3.
Nice! Do you have any release date of this fix (n the alpha/beta channel ?
*** Bug 13506 has been marked as a duplicate of this bug. ***
A customer is reporting that the issue is back in the latest Alpha release (6.4.1)
Which version is the customer using ? The latest x.ios version is 6.4.3, not 6.4.1.
It was the latest beta version, not alpha.
The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).
That will give us something like comment #11 (and removes doubt and work duplication).
I re-selected the beta version just now (have been using stable which does not exhibit the problem) and re-created the crash.
Here is the version information:
=== Xamarin Studio ===
Version 4.0.12 (build 3)
Installation UUID: 36f870a5-a2fe-447e-a8a6-ebf61bb1270e
Mono 3.2.1 ((no/f3f789e)
Package version: 302010001
=== Apple Developer Tools ===
Xcode 4.6.2 (2067.2)
=== Xamarin.iOS ===
Version: 22.214.171.124 (Business Edition)
Build date: 2013-13-08 05:24:39-0400
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.Android ===
Version: 4.8.1 (Starter Edition)
Android SDK: /Users/sam/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
Java SDK: /usr
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)
=== Build Information ===
Release ID: 400120003
Git revision: 593d7acb1cb78ceeeb482d5133cf1fe514467e39
Build date: 2013-08-07 20:30:53+0000
Xamarin addins: 25a0858b281923e666b09259ad4746b774e0a873
=== Operating System ===
Mac OS X 10.7.5
Darwin SM-MBP.local 11.4.2 Darwin Kernel Version 11.4.2
Thu Aug 23 16:25:48 PDT 2012
I cannot reproduce the problem using the original testcase in either debug or release mode.
You're testing on the device (it works in the simulator)?
Also, my bug was "Bug 13506 - Serializing and deserializing a Dictionary in latest beta" which was set to being a duplicate of this issue. Maybe you could try the test case attached to 13506.
I can't reproduce using the testcase to 13506 either.
My apologies for belaboring this point, but can you confirm that you tested the 13506 test case using the beta version on a device and not the simulator?
Also, I now get the error using the Stable channel as well as the beta channel.
Also, can you suggest the best way of ensuring I have a clean version of xamarin to make sure the problem is not caused by my set-up?
Yes, it was tested on the device.
As for 13506, can you attach the complete test project which is failing ?
You can re-install xamarin by deleting /Developer/MonoTouch.
I've attached the complete solution for the test case on 13506
It looks like the reference bug #13506 was closed after last comment.
If you are still experiencing this issue please provide all the requested information and re-open the bug report. Thanks!