-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-SerializationblockedIssue/PR is blocked on something - see commentsIssue/PR is blocked on something - see commentslinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework
Milestone
Description
Repro: consoleapp-bfe9f43.zip
Run make linked to run with TrimMode=link, and make notlinked to run the same command, except without setting TrimMode.
$ make linked
** Executing linked app
bin/Debug/netcoreapp5.0/osx-x64/publish/myproject
❌ failed: System.InvalidOperationException: There was an error reflecting type 'LinkSdk.Serialization.XmlSerializationTest.Response'.
---> System.InvalidOperationException: There was an error reflecting property 'DataUpdates'.
---> System.InvalidOperationException: There was an error reflecting type 'LinkSdk.Serialization.XmlSerializationTest.DataUpdates'.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.RuntimeType.RuntimeTypeCache.GetDefaultMemberName()
at System.RuntimeType.GetDefaultMemberName()
at System.RuntimeType.GetDefaultMembers()
at System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type type, String memberInfo)
at System.Xml.Serialization.TypeScope.ImportTypeDesc(Type type, MemberInfo memberInfo, Boolean directReference)
at System.Xml.Serialization.TypeScope.GetTypeDesc(Type type, MemberInfo source, Boolean directReference, Boolean throwOnError)
at System.Xml.Serialization.StructModel.GetPropertyModel(PropertyInfo propertyInfo)
at System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo memberInfo)
at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportAccessorMapping(MemberMapping accessor, FieldModel model, XmlAttributes a, String ns, Type choiceIdentifierType, Boolean rpc, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportFieldMapping(StructModel parent, FieldModel model, XmlAttributes a, String ns, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping mapping, StructModel model, Boolean openModel, String typeName, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel model, String ns, Boolean openModel, XmlAttributes a, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, Boolean repeats, Boolean openModel, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel model, String ns, ImportContext context, String dataType, XmlAttributes a, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel model, XmlRootAttribute root, String defaultNamespace, RecursionLimiter limiter)
at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type type, XmlRootAttribute root, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at LinkSdk.Serialization.XmlSerializationTest.Response.get_Serializer() in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 63
at LinkSdk.Serialization.XmlSerializationTest.Response.Deserialize(String xml) in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 73
at LinkSdk.Serialization.XmlSerializationTest.Bug1820_GenericList() in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 188
at App.Main() in /Users/rolf/test/dotnet/consoleapp/Program.cs:line 27
$ make notlinked
** Executing notlinked app
bin/Debug/netcoreapp5.0/osx-x64/publish/myproject
✅ succeeded: LinkSdk.Serialization.XmlSerializationTest+Response$ dotnet --version
5.0.100-rc.1.20414.5*** Moved from dotnet/linker#1454 ***
Metadata
Metadata
Labels
area-SerializationblockedIssue/PR is blocked on something - see commentsIssue/PR is blocked on something - see commentslinkable-frameworkIssues associated with delivering a linker friendly frameworkIssues associated with delivering a linker friendly framework