Bug 36100 - DataContractSerializer broke in XI 9.2.1.51 STABLE
Summary: DataContractSerializer broke in XI 9.2.1.51 STABLE
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries (show other bugs)
Version: XI 9.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: C6SR1
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2015-11-20 11:50 UTC by Neal
Modified: 2016-01-28 19:22 UTC (History)
13 users (show)

See Also:
Tags: BZCU
Is this bug a regression?: ---
Last known good build:


Attachments
Small repro, happens on iOS/Device/64 bits only (12.57 KB, application/octet-stream)
2015-12-03 22:18 UTC, Miguel de Icaza [MSFT]
Details

Description Neal 2015-11-20 11:50:41 UTC
Hello,

Since updating to the recent stables released this past week my DataContractSerializer is failing preventing me from releasing new builds until resolved.  Please find code below and error messages, thank you.

Exception: -------------------------------------------

Message: Sync Failed
Exception: Exception has been thrown by the target of an invocation.:::  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) <0x100721490 + 0x000e8> in <filename unknown>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) <0x100591994 + 0x00027> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) <0x100ce611c + 0x001b7> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) <0x100ce5c3c + 0x0044b> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) <0x100ce5178 + 0x00413> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) <0x100ce3ff4 + 0x0027f> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) <0x100ce3b40 + 0x000ab> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) <0x100c8d664 + 0x00063> in <filename unknown>:0 
  at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) <0x100c6e65c + 0x0003b> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) <0x100c98060 + 0x00027> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) <0x100c957c8 + 0x000c7> in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) <0x100c7d4e0 + 0x00147> in <filename unknown>:0 
  at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) <0x100c7d0f8 + 0x0003f> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) <0x100d27580 + 0x0019f> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.Xml.XmlDictionaryWriter writer, System.Object graph) <0x100c8d900 + 0x0004f> in <filename unknown>:0 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.IO.Stream stream, System.Object graph) <0x100c8d75c + 0x0004f> in <filename unknown>:0 
  at APDL.APDLSyncDataExtensions.ToAPDLSyncDataByteArray (APDL.Data.DataContracts.APDLSyncData value) <0x1000e2ccc + 0x0005f> in <filename unknown>:0 
  at APDL.SyncToCoreData+<sync>c__AnonStorey66+<sync>c__async65.MoveNext () <0x100373de0 + 0x0085b> in <filename unknown>:0 
Method: sync

Code Elements: ----------------------------------------

        public static byte[] ToAPDLSyncDataByteArray(this APDLSyncData value)
        {
            using (var ms = new MemoryStream())
            {
                DataContractSerializer serializer = new DataContractSerializer(typeof(APDLSyncData));
                serializer.WriteObject(ms, value);
                var buffer = ms.ToArray();
                return Serialization.CompressArray(buffer);
            }
        }

        public static byte[] CompressArray(byte[] plainBytes)
        {
            if (plainBytes == null)
                return null;
            byte[] compBytes;
            using (MemoryStream ms = new MemoryStream())
            {

                using (DeflateStream cs = new DeflateStream(ms, CompressionMode.Compress, true))
                {
                    cs.Write(plainBytes, 0, plainBytes.Length);
                    cs.Flush();
                }
                compBytes = ms.ToArray();
            }
            return compBytes;
        }



Xamarin Version Details -------------------------------


=== Xamarin Studio ===

Version 5.10 (build 871)
Installation UUID: 977c8d8f-65ac-421e-962a-f04be20ab5be
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.1.1 (9081)
Build 7B1005

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/Neal/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 

Java SDK: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.7
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.4.0.109 (Business Edition)

=== Xamarin.iOS ===

Version: 9.2.1.51 (Business Edition)
Hash: 3c0ec35
Branch: master
Build date: 2015-11-12 13:05:39-0500

=== Build Information ===

Release ID: 510000871
Git revision: 4e9c5abb5ffdae12ba02ac49da83f8b2011dbb88
Build date: 2015-11-12 06:02:54-05
Xamarin addins: 55007ed0e56436f385d8e26394a45be563abc7e8
Build lane: monodevelop-lion-cycle6

=== Operating System ===

Mac OS X 10.11.1
Darwin NEALs-iMacR.local 15.0.0 Darwin Kernel Version 15.0.0
    Sat Sep 19 15:53:46 PDT 2015
    root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 1 Neal 2015-11-20 12:31:14 UTC
This issue appears to only occur in 64 bit, if I set the debug/iPhone to use a "device specific" build it pushes a 32 bit build which does not experience this issue.  I'm testing on an iPhone 6S.
Comment 2 Neal 2015-11-20 12:34:27 UTC
A better stack trace from more debugging:

Exception: Exception has been thrown by the target of an invocation.:::  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) [0x00028] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:516 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x0025e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:503 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) [0x00193] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:346 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) [0x000e4] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:154 
  at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) [0x0004f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:78 
  at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:16 
  at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs:451 
  at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723 
  at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158 
  at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x000ea] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:388 
  at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00008] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:275 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00079] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:82 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:64 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.Xml.XmlDictionaryWriter writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:59 
  at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.IO.Stream stream, System.Object graph) [0x00018] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:29 
  at APDL.APDLSyncDataExtensions.ToAPDLSyncDataByteArray (APDL.Data.DataContracts.APDLSyncData value) [0x0001b] in /Users/Neal/Dev/apdl-ios/APDL.iOS/Extensions/SyncExtensions.cs:37 
  at APDL.SyncToCoreData+<sync>c__AnonStorey66+<sync>c__async65.MoveNext () [0x00357] in /Users/Neal/Dev/apdl-ios/APDL.iOS/Code/SyncToCoreData.cs:1056 
Method: sync
Comment 3 Sebastien Pouliot 2015-11-20 14:14:39 UTC
This is likely specific to the `APDLSyncData` type. Can you share it's definition ? that should allow us to replicate the issue.
Comment 4 Neal 2015-11-20 14:21:11 UTC
Hello Sebastien,

Thank you for the quick reply:

[System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    [System.Runtime.Serialization.DataContractAttribute(Name="APDLSyncData", Namespace="http://schemas.datacontract.org/2004/07/APDL.Data.DataContracts")]
    public partial class APDLSyncData : object
    {

        private APDL.Data.DataContracts.AircraftDTO[] AircraftField;

        private APDL.Data.DataContracts.AircraftTypeDTO[] AircraftTypesField;

        private APDL.Data.DataContracts.AirlineDTO[] AirlinesField;

        private APDL.Data.DataContracts.AirportDTO[] AirportsField;

        private APDL.Data.DataContracts.ApproachDTO[] ApproachesField;

        private APDL.Data.DataContracts.ApproachesLegDTO[] ApproachesLegsField;

        private APDL.Data.DataContracts.BinaryCatalogDTO[] BinariesField;

        private APDL.Data.DataContracts.CrewDTO[] CrewsField;

        private APDL.Data.DataContracts.DayDTO[] DaysField;

        private APDL.Data.DataContracts.EmploymentEventDTO[] EmploymentEventsField;

        private APDL.Data.DataContracts.EventDTO[] EventsField;

        private APDL.Data.DataContracts.DataInspection FlightDataInspectionField;

        private APDL.Data.DataContracts.GlobalSettingDTO[] GlobalSettingsField;

        private APDL.Data.DataContracts.HotelDTO[] HotelsField;

        private APDL.Data.DataContracts.LegDTO[] LegsField;

        private APDL.Data.DataContracts.NoteDTO[] NotesField;

        private APDL.Data.DataContracts.PayperiodEventDTO[] PayperiodEventsField;

        private APDL.Data.DataContracts.PayrollCategoryDTO[] PayrollCategoriesField;

        private APDL.Data.DataContracts.PayrollDTO[] PayrollsField;

        private APDL.Data.DataContracts.PerformanceDTO[] PerformancesField;

        private APDL.Data.DataContracts.PositionDTO[] PositionsField;

        private APDL.Data.DataContracts.ReglatoryOperationTypeDTO[] ReglatoryOperationTypesField;

        private APDL.Data.DataContracts.TripDTO[] TripsField;

        private APDL.Data.DataContracts.UserSettingDTO[] UserSettingsField;

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.AircraftDTO[] Aircraft
        {
            get
            {
                return this.AircraftField;
            }
            set
            {
                this.AircraftField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.AircraftTypeDTO[] AircraftTypes
        {
            get
            {
                return this.AircraftTypesField;
            }
            set
            {
                this.AircraftTypesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.AirlineDTO[] Airlines
        {
            get
            {
                return this.AirlinesField;
            }
            set
            {
                this.AirlinesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.AirportDTO[] Airports
        {
            get
            {
                return this.AirportsField;
            }
            set
            {
                this.AirportsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.ApproachDTO[] Approaches
        {
            get
            {
                return this.ApproachesField;
            }
            set
            {
                this.ApproachesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.ApproachesLegDTO[] ApproachesLegs
        {
            get
            {
                return this.ApproachesLegsField;
            }
            set
            {
                this.ApproachesLegsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.BinaryCatalogDTO[] Binaries
        {
            get
            {
                return this.BinariesField;
            }
            set
            {
                this.BinariesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.CrewDTO[] Crews
        {
            get
            {
                return this.CrewsField;
            }
            set
            {
                this.CrewsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.DayDTO[] Days
        {
            get
            {
                return this.DaysField;
            }
            set
            {
                this.DaysField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.EmploymentEventDTO[] EmploymentEvents
        {
            get
            {
                return this.EmploymentEventsField;
            }
            set
            {
                this.EmploymentEventsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.EventDTO[] Events
        {
            get
            {
                return this.EventsField;
            }
            set
            {
                this.EventsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.DataInspection FlightDataInspection
        {
            get
            {
                return this.FlightDataInspectionField;
            }
            set
            {
                this.FlightDataInspectionField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.GlobalSettingDTO[] GlobalSettings
        {
            get
            {
                return this.GlobalSettingsField;
            }
            set
            {
                this.GlobalSettingsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.HotelDTO[] Hotels
        {
            get
            {
                return this.HotelsField;
            }
            set
            {
                this.HotelsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.LegDTO[] Legs
        {
            get
            {
                return this.LegsField;
            }
            set
            {
                this.LegsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.NoteDTO[] Notes
        {
            get
            {
                return this.NotesField;
            }
            set
            {
                this.NotesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.PayperiodEventDTO[] PayperiodEvents
        {
            get
            {
                return this.PayperiodEventsField;
            }
            set
            {
                this.PayperiodEventsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.PayrollCategoryDTO[] PayrollCategories
        {
            get
            {
                return this.PayrollCategoriesField;
            }
            set
            {
                this.PayrollCategoriesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.PayrollDTO[] Payrolls
        {
            get
            {
                return this.PayrollsField;
            }
            set
            {
                this.PayrollsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.PerformanceDTO[] Performances
        {
            get
            {
                return this.PerformancesField;
            }
            set
            {
                this.PerformancesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.PositionDTO[] Positions
        {
            get
            {
                return this.PositionsField;
            }
            set
            {
                this.PositionsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.ReglatoryOperationTypeDTO[] ReglatoryOperationTypes
        {
            get
            {
                return this.ReglatoryOperationTypesField;
            }
            set
            {
                this.ReglatoryOperationTypesField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.TripDTO[] Trips
        {
            get
            {
                return this.TripsField;
            }
            set
            {
                this.TripsField = value;
            }
        }

        [System.Runtime.Serialization.DataMemberAttribute()]
        public APDL.Data.DataContracts.UserSettingDTO[] UserSettings
        {
            get
            {
                return this.UserSettingsField;
            }
            set
            {
                this.UserSettingsField = value;
            }
        }
    }
Comment 6 Rodrigo Kumpera 2015-11-23 11:36:05 UTC
Hey Marcos,

Could you look at this one?
Comment 7 Neal 2015-12-02 18:09:23 UTC
Any update please? Today's stables did not resolve this and I am still dead in the water unable to push an App Store build until this is fixed.  This appears to be a significant serialization problem broken in Xamarin 4.

Thank you.
Comment 8 marcos.henrich 2015-12-02 19:54:23 UTC
Hi Neal,

This issue and others such as https://bugzilla.xamarin.com/show_bug.cgi?id=34413 were caused by changing xml serialization code to the microsoft reference sources. Current Mono's System.ServiceModel does not works well with the recent serialization changes.

I am currently working on updating Mono's WCF, unfortunately I don't think the updated WCF will be ready to be included in 4.2 service releases.

Until the update I recommend replacing the mono install in your system with Mono 4.0. You can download previous mono installer here: http://download.mono-project.com/archive/4.0.5/macos-10-x86/
Comment 9 Neal 2015-12-02 19:59:09 UTC
Can you consider rolling back the xml serialization areas to the previous references until you have a properly working code base for a stable release?  We need to get this resolved please otherwise we cannot publish to the app store as we are trapped in 32 bit mode and Apple requires 64 bit.  Also, why does this work in 32 bit but not 64 bit?
Comment 10 Neal 2015-12-03 13:27:29 UTC
Please change the status of this case to BLOCKER.  This should have never passed Q/A for a stable channel release.  I am looking for a timely and prompt fix to the stable channel.

Thank you.

Neal Culiner
President, NC Software, Inc.
Comment 11 Miguel de Icaza [MSFT] 2015-12-03 17:26:35 UTC
Neal,

Could you provide us access to your code, the single class that we have is not enough to reproduce the issue.
Comment 13 Miguel de Icaza [MSFT] 2015-12-03 22:18:37 UTC
Created attachment 14112 [details]
Small repro, happens on iOS/Device/64 bits only
Comment 14 Miguel de Icaza [MSFT] 2015-12-03 22:24:16 UTC
Looks like an AOT issue with Nullable:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ExecutionEngineException: Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_bool_Nullable`1<Decimal> (object,intptr,intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.UnwrapNullableObject (System.Func`1 memberValue, System.Type& memberType, System.Boolean& isNull) [0x00019] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:525
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x000cb] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:479
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) [0x00193] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:346
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) [0x000e4] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:154
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) [0x0004f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:78
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:16
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs:451
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0007f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:137
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0000e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:113
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) [0x00028] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:516
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x0025e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:503
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteCollection (System.Runtime.Serialization.CollectionDataContract collectionContract) [0x00118] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:190
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteCollectionToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.CollectionDataContract collectionContract) [0x00043] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:96
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateCollectionWriter>c__AnonStorey1.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.CollectionDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:21
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00007] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/CollectionDataContract.cs:1430
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0007f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:137
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0000e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:113
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) [0x00028] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:516
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x0025e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:503
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) [0x00193] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:346
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) [0x000e4] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:154
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) [0x0004f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:78
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:16
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs:451
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x000ea] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:388
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00008] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:275
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00079] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:82
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:64
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.Xml.XmlDictionaryWriter writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:59
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.IO.Stream stream, System.Object graph) [0x00018] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:29
at host.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x00216] in /private/tmp/apdl/Solutions/APDL/host/AppDelegate.cs:57
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:61
at host.Application.Main (System.String[] args) [0x00008] in /private/tmp/apdl/Solutions/APDL/host/Main.cs:12
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: Unhandled managed exception:
Exception has been thrown by the target of an invocation. (System.Reflection.TargetInvocationException)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) [0x00028] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:516
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x0025e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:503
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) [0x00193] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:346
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) [0x000e4] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:154
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) [0x0004f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:78
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:16
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs:451
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x000ea] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:388
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00008] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/DataContractSerializer.cs:275
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph, System.Runtime.Serialization.DataContractResolver dataContractResolver) [0x00079] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:82
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions (System.Runtime.Serialization.XmlWriterDelegator writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:64
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.Xml.XmlDictionaryWriter writer, System.Object graph) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:59
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject (System.IO.Stream stream, System.Object graph) [0x00018] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializer.cs:29
at host.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x00216] in /private/tmp/apdl/Solutions/APDL/host/AppDelegate.cs:57
at (wrapper managed-to-native) UIKit.UIApplication:UIApplicationMain (int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, IntPtr principal, IntPtr delegate) [0x00005] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:77
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:61
at host.Application.Main (System.String[] args) [0x00008] in /private/tmp/apdl/Solutions/APDL/host/Main.cs:12
--- inner exception ---
Exception has been thrown by the target of an invocation. (System.Reflection.TargetInvocationException)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.InternalSerialize (System.Reflection.MethodInfo methodInfo, System.Func`1 memberValue, System.Type memberType, Boolean writeXsiType) [0x00028] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:516
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x0025e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:503
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteCollection (System.Runtime.Serialization.CollectionDataContract collectionContract) [0x00118] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:190
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteCollectionToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.CollectionDataContract collectionContract) [0x00043] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:96
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateCollectionWriter>c__AnonStorey1.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.CollectionDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:21
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00007] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/CollectionDataContract.cs:1430
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0007f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:137
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0000e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:113
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--- inner exception ---
Exception has been thrown by the target of an invocation. (System.Reflection.TargetInvocationException)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00050] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:303
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/reflection/methodbase.cs:277
at System.Runtime.Serialization.XmlFormatWriterInterpreter.UnwrapNullableObject (System.Func`1 memberValue, System.Type& memberType, System.Boolean& isNull) [0x00019] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:525
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteValue (System.Type memberType, System.Object memberValue, Boolean writeXsiType) [0x000cb] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:479
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteMembers (System.Runtime.Serialization.ClassDataContract classContract, System.Runtime.Serialization.ExtensionDataObject extensionData, System.Runtime.Serialization.ClassDataContract derivedMostClassContract) [0x00193] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:346
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteClass (System.Runtime.Serialization.ClassDataContract classContract) [0x000e4] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:154
at System.Runtime.Serialization.XmlFormatWriterInterpreter.WriteToXml (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context, System.Runtime.Serialization.ClassDataContract dataContract) [0x0004f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:78
at System.Runtime.Serialization.XmlFormatWriterGenerator+CriticalHelper+<GenerateClassWriter>c__AnonStorey0.<>m__0 (System.Runtime.Serialization.XmlWriterDelegator xw, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext ctx, System.Runtime.Serialization.ClassDataContract ctr) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs:16
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, System.Runtime.Serialization.XmlObjectSerializerWriteContext context) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/ClassDataContract.cs:451
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00000] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:723
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType (System.Runtime.Serialization.DataContract dataContract, System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, RuntimeTypeHandle declaredTypeHandle) [0x00046] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:158
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0007f] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:137
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference (System.Runtime.Serialization.XmlWriterDelegator xmlWriter, System.Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle) [0x0000e] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/System.Runtime.Serialization/System/Runtime/Serialization/XmlObjectSerializerWriteContext.cs:113
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
--- inner exception ---
Attempting to JIT compile method '(wrapper runtime-invoke) <Module>:runtime_invoke_bool_Nullable`1<Decimal> (object,intptr,intptr,intptr)' while running with --aot-only. See http://docs.xamarin.com/ios/about/limitations for more information.
(System.ExecutionEngineException)
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00038] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:295
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: Stacktrace:
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical:
Native stacktrace:
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	0   host                                0x0000000100dfda48 mono_handle_native_sigsegv + 260
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	1   libsystem_platform.dylib            0x000000019b76194c _sigtramp + 68
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	2   libsystem_pthread.dylib             0x000000019b768ef8 pthread_kill + 112
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	3   libsystem_c.dylib                   0x000000019b612b78 abort + 140
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	4   host                                0x0000000100ec9e60 _ZL15print_exceptionP10MonoObjectbP15NSMutableString + 0
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	5   host                                0x0000000100dfe114 mono_invoke_unhandled_exception_hook + 96
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	6   host                                0x0000000100dfd85c mono_handle_exception_internal + 4228
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	7   host                                0x0000000100dfc7cc mono_handle_exception + 40
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	8   host                                0x0000000100df676c mono_arm_throw_exception + 200
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	9   host                                0x00000001006a32b8 throw_exception + 168
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	10  host                                0x00000001004e4de8 System_Reflection_MonoMethod_Invoke_object_System_Reflection_BindingFlags_System_Reflection_Binder_object___System_Globalization_CultureInfo + 824
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	11  host                                0x00000001002c1260 System_Reflection_MethodBase_Invoke_object_object__ + 144
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	12  host                                0x0000000100c76a74 System_Runtime_Serialization_XmlFormatWriterInterpreter_InternalSerialize_System_Reflection_MethodInfo_System_Func_1_object_System_Type_bool + 1172
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	13  host                                0x0000000100c7658c System_Runtime_Serialization_XmlFormatWriterInterpreter_WriteValue_System_Type_object_bool + 3804
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	14  host                                0x0000000100c74408 System_Runtime_Serialization_XmlFormatWriterInterpreter_WriteMembers_System_Runtime_Serialization_ClassDataContract_System_Runtime_Serialization_ExtensionDataObject_System_Runtime_Serialization_ClassDataContract + 2344
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	15  host                                0x0000000100c7174c System_Runtime_Serialization_XmlFormatWriterInterpreter_WriteClass_System_Runtime_Serialization_ClassDataContract + 1500
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	16  host                                0x0000000100c70770 System_Runtime_Serialization_XmlFormatWriterInterpreter_WriteToXml_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_XmlObjectSerializerWriteContext_System_Runtime_Serialization_ClassDataContract + 528
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	17  host                                0x0000000100b9a964 System_Runtime_Serialization_XmlFormatWriterGenerator_CriticalHelper__GenerateClassWriterc__AnonStorey0__m__0_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_XmlObjectSerializerWriteContext_System_Runtime_Serialization_ClassDataContract + 180
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	18  host                                0x0000000100b351ec System_Runtime_Serialization_ClassDataContract_WriteXmlValue_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_XmlObjectSerializerWriteContext + 172
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	19  host                                0x0000000100bb9e54 System_Runtime_Serialization_XmlObjectSerializerWriteContext_WriteDataContractValue_System_Runtime_Serialization_DataContract_System_Runtime_Serialization_XmlWriterDelegator_object_System_RuntimeTypeHandle + 132
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	20  host                                0x0000000100bb3494 System_Runtime_Serialization_XmlObjectSerializerWriteContext_SerializeWithoutXsiType_System_Runtime_Serialization_DataContract_System_Runtime_Serialization_XmlWriterDelegator_object_System_RuntimeTypeHandle + 580
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	21  host                                0x0000000100b66f58 System_Runtime_Serialization_DataContractSerializer_InternalWriteObjectContent_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_DataContractResolver + 1624
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	22  host                                0x0000000100b6602c System_Runtime_Serialization_DataContractSerializer_InternalWriteObject_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_DataContractResolver + 188
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	23  host                                0x0000000100b9b44c System_Runtime_Serialization_XmlObjectSerializer_WriteObjectHandleExceptions_System_Runtime_Serialization_XmlWriterDelegator_object_System_Runtime_Serialization_DataContractResolver + 780
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	24  host                                0x0000000100b9b114 System_Runtime_Serialization_XmlObjectSerializer_WriteObjectHandleExceptions_System_Runtime_Serialization_XmlWriterDelegator_object + 116
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	25  host                                0x0000000100b9b068 System_Runtime_Serialization_XmlObjectSerializer_WriteObject_System_Xml_XmlDictionaryWriter_object + 168
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	26  host                                0x0000000100b9ac60 System_Runtime_Serialization_XmlObjectSerializer_WriteObject_System_IO_Stream_object + 272
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	27  host                                0x000000010007d6f8 host_AppDelegate_FinishedLaunching_UIKit_UIApplication_Foundation_NSDictionary + 5144
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	28  host                                0x000000010064c2e4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 484
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	29  host                                0x0000000100e07c50 mono_jit_runtime_invoke + 1280
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	30  host                                0x0000000100e5be54 mono_runtime_invoke + 124
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	31  host                                0x0000000100dcef04 _ZL30native_to_managed_trampoline_5P11objc_objectP13objc_selectorPP11_MonoMethodS0_S0_PKcS7_S7_S7_ + 640
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	32  host                                0x0000000100dcec74 -[AppDelegate application:didFinishLaunchingWithOptions:] + 96
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	33  UIKit                               0x000000018b789324 <redacted> + 400
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	34  UIKit                               0x000000018b9b7acc <redacted> + 2904
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	35  UIKit                               0x000000018b9bbe0c <redacted> + 1656
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	36  UIKit                               0x000000018b9b8f50 <redacted> + 168
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	37  FrontBoardServices                  0x000000018ff9f7c4 <redacted> + 184
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	38  FrontBoardServices                  0x000000018ff9fb44 <redacted> + 56
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	39  CoreFoundation                      0x0000000186138544 <redacted> + 24
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	40  CoreFoundation                      0x0000000186137fd8 <redacted> + 540
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	41  CoreFoundation                      0x0000000186135cd8 <redacted> + 724
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	42  CoreFoundation                      0x0000000186064ca0 CFRunLoopRunSpecific + 384
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	43  UIKit                               0x000000018b7821c8 <redacted> + 460
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	44  UIKit                               0x000000018b77cffc UIApplicationMain + 204
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	45  host                                0x000000010014a9b4 wrapper_managed_to_native_UIKit_UIApplication_UIApplicationMain_int_string___intptr_intptr + 756
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	46  host                                0x00000001000babc0 UIKit_UIApplication_Main_string___intptr_intptr + 144
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	47  host                                0x00000001000baaf0 UIKit_UIApplication_Main_string___string_string + 416
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	48  host                                0x000000010007c120 host_Application_Main_string__ + 160
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	49  host                                0x000000010064c2e4 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 484
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	50  host                                0x0000000100e07c50 mono_jit_runtime_invoke + 1280
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	51  host                                0x0000000100e5be54 mono_runtime_invoke + 124
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	52  host                                0x0000000100e6003c mono_runtime_exec_main + 400
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	53  host                                0x0000000100edf41c xamarin_main + 1840
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	54  host                                0x0000000100dcfe2c main + 96
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical: 	55  libdyld.dylib                       0x000000019b5828b8 <redacted> + 4
Dec  3 17:23:18 Miguel-de-Icazas-iPhone host[283] <Warning>: critical:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
Comment 15 Neal 2015-12-03 22:27:08 UTC
This sync code for serialization has been in use about 3 years so it has been working fine up to Xam 4.
Comment 16 Miguel de Icaza [MSFT] 2015-12-04 00:12:42 UTC
One thing to consider is whether the reference source code that does these Invokes could be taught about the target signature as opposed to having to teach the static compiler to generate this code.
Comment 17 Miguel de Icaza [MSFT] 2015-12-04 00:14:52 UTC
Another option: if we have a static system, why use "InternalSerialize" with an Invoke in mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs?

Perhaps we could jsut hardcode the invocations there instead, less code, less indirections.

Atsushi, thoughts?
Comment 18 Atsushi Eno 2015-12-04 07:49:59 UTC
I see there are several options from high level to low level.

1) go back to old code (like comment #9 says)

People who want to stick to old System.Runtime.Serialization behavior should really just download old Xamarin.iOS and just replace the reference (API wise it should be binary compatible). Old code had many bugs that a lot more users don't want to have brought back, so I believe that going back is no-go. Neither is "it shouldn't have been replaced with referencesource" valid, that rseults in louder "Why doesn't mono adopt referencesource, don't waste Microsoft's great effort!" voices. Xamarin did what it should.
And this should be made clear, the QA team has been doing great job too so that they also ran existing available nunit tests. If Xamarin spend more development resources on writing much more tests when adopting referencesource, that means it slows down other development and results in delayed platform adoptation. (Positive objections are welcome here.)

2) switch to "static system" like .NET Native does

I guess that's what comment #17 means - correct? If we don't switch to "static system" we need the interpreter to avoid dynamic JIT compilation (that's what ~Writer_static.cs name means).

To my understanding, it won't be doable within short timeframe like Microsoft have spent fair amount of time to accomplish that. Even if it's available now in dotnet/corert (I haven't checked its details) it'd take time for us to adopt that.

3) work with existing code with limited Nullable primitives

There is a handful of necessary MakeGenericMethod() invocations in the current codebase, so adding some code only to that XmlFormatWriterInterpreter.UnwrapNullableObject() is not enough.

We could instantiate some generic methods in serializer/deserializer use in prior, with Nullable of primitives. If that's enough it's fairly doable. We could just add some helper method cache (instead of calling MakeGenericMethod() directly). The uses of MakeGenericMethod() are not a few but not too many.

I'm not very familiar with XiOS generic codegen, so not sure how much it will save though...

4) catalog based codegen

Based on existing code, but, how about this: XiOS tuner automatically - or manually (based on catalogs, per app) - collects use of Nullable<T> (I mean, Ts used by Nullable) and generate MakeGenericMethod() on methods like XmlFormatGeneratorStatics.EnsureArraySizeMethod(), then with each of those T types, at AOT time so that it does not have to attempt to generate code dynamically.
The methods to generate native code in prior could be also collected by the tuner or we explicitly name those for the serialization/deserialization.

I'm not sure how realistic this is in XiOS tuner. That's more work than 3) I guess, and assumes catalog input by app developers.
Comment 19 Miguel de Icaza [MSFT] 2015-12-04 16:21:06 UTC
Actually, this is what I meant by comment #17:

https://gist.github.com/migueldeicaza/7dc33952ec47b9c37830

The InternalSerialize method is only used to call one of two MethodInfo parameters.   These MethodInfo parameters come from the XmlFormatGeneratorStatics.

And these in turn are just lookups to MethodInfos in a type, I am not sure why we can not just use directly the method in XmlObjectSerializerWriteContext as that type is not generic.   At least for these instances.

Because currently we do:

XmlFormatGeneratorStatics's InternalSerialize does a reflection lookup for a member in XmlObjectSerializerWriteContext, for the method "InternalSerialize".   This returns a MethodInfo, this we later use to call Invoke() on.

But I do not understand why we would not just call the method inline, like I show on my patch.
Comment 20 Atsushi Eno 2015-12-04 17:01:45 UTC
The reason why we have that structure is to NOT change Microsoft's referencesource. "If" that structure is causing the problem, we could rewrite it.
Comment 21 Miguel de Icaza [MSFT] 2015-12-04 18:46:52 UTC
Pull request with the tested fix:

https://github.com/mono/mono/pull/2286

iOS Build will be here shortly:

https://code.internalx.com/Wrench/BuildDetails?buildId=1a89e576c068fe6f0732ddaafa8c47
Comment 22 Neal 2015-12-10 22:52:20 UTC
When will this fix be available for me to test, and hopefully in STABLE?  I'm seeing another XML serialization issue in another WCF call per Insights:

https://insights.xamarin.com/app/APDL3b54/issues/1461

We have a byte array of binaries (images) that we download over WCF in a payload and it's not processing properly:

System.Object.__icall_wrapper_mono_delegate_end_invoke(object, intptr)(wrapper managed-to-native)
at (wrapper delegate-end-invoke) <Module>:end_invoke_object__this___object[]&_IAsyncResult (object[]&,System.IAsyncResult)
System.ServiceModel.MonoInternal.ClientRuntimeChannel.EndProcess(MethodBase method, string operationName, object[] parameters, IAsyncResult result)
System.ServiceModel.ClientBase<TChannel>.ChannelBase<T>.EndInvoke(string methodName, object[] args, IAsyncResult result)
NCSoftware.Services.APDLServices.APDLServiceClient.APDLServiceClientChannel.EndGetWeatherRadar680x320(IAsyncResult result)
System.Threading.Tasks.TaskFactory<TResult>.FromAsyncCoreLogic(IAsyncResult iar, Func<_,_> endFunction, Action<_> endAction, Task<_> promise, bool requiresSynchronization)
APDL.NCSoftwareRadarImageLoader.DownloadLatestImages()
Comment 23 Neal 2015-12-11 01:54:43 UTC
I'm still investigating the bug my beta testers are having but this is the method that handles the deserialization of the images:

        public static TData DeserializeObject<TData>(byte[] buffer) where TData : new()
        {
            try
            {
                var serializer = new XmlSerializer(typeof(TData));
                UTF8Encoding encoder = new UTF8Encoding(false, true);
                byte[] expandedBytes = DecompressArray(buffer);
				string xmlStr = encoder.GetString(expandedBytes);
                using (var xmlReader = new StringReader(xmlStr))
                {
                    var obj = (TData)serializer.Deserialize(xmlReader);
                    return obj;
                }
            }
            catch (Exception ex)
            {
                Logger.LogException(ex.Message, ex, "DeserializeObject");
            }
            return default(TData);
        }
Comment 24 Neal 2015-12-11 01:55:17 UTC
        static byte[] DecompressArray(byte[] bytes)
        {
            try
            {
                byte[] expandedBytes;
				using (var msIn = new MemoryStream(bytes))
				using (var msOut = new MemoryStream())
				using (var cs = new GZipStream(msIn, CompressionMode.Decompress, true))
				{
					cs.CopyTo(msOut);
					expandedBytes = msOut.ToArray();
				}
                return expandedBytes;
            }
            catch (Exception ex)
            {
                Logger.LogException(ex.Message, ex, "DecompressArray");
                return null;
            }
        }
Comment 25 Miguel de Icaza [MSFT] 2015-12-11 02:22:03 UTC
I do not think the crash is related to this method.

The crash is reported as:

System.Xml.XmlExceptionElement 'Envelope' with namespace name 'http://schemas.xmlsoap.org/soap/envelope/' was not found. Line 4, position 2.
Raw


Looks more like a response is different from what the client side expects.
Comment 26 Neal 2015-12-11 02:23:43 UTC
It's odd that this is happening on older devices such as my 6 Plus but 6S is working fine.  I'll create a new bug if needed, I'm still investigating...I'll close this one out.

Thanks.
Comment 27 Neal 2015-12-14 21:40:32 UTC
The last few posts was in fact "MY" bug :(  As to the serialization bug in the MONO framework when may we expect a stable push with this fix?

Thank you.

Neal
Comment 29 Saurabh 2015-12-17 11:48:34 UTC
I have checked this Issue with C6SR1. It is working fine on this build as well.
This is the screencast for the same: https://gist.github.com/saurabh360/8a03f38ac20c1f9c6726

iPhone 6+ Version 9.2

=== Xamarin Studio ===

Version 5.10.2 (build 48)
Installation UUID: 2939b8b4-8977-42bd-82d6-100275ccd9cd
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.23.70.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 6.0.1.5 (Enterprise Edition)
Android SDK: /Users/360_macmini/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.3.4
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.1 (9079)
Build 7B91b

=== Xamarin.iOS ===

Version: 9.4.1.8 (Enterprise Edition)
Hash: f146d47
Branch: master
Build date: 2015-12-15 16:23:04-0500

=== Xamarin.Mac ===

Version: 2.4.1.5 (Enterprise Edition)

=== Build Information ===

Release ID: 510020048
Git revision: e9bd06cdfab010221c38efb284d166f49968d065
Build date: 2015-12-16 17:03:21-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.10.5
Darwin Hello.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64

Note You need to log in before you can comment on or make changes to this bug.