Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=81341 --- shadow/81341 2007-04-09 17:20:28.000000000 -0400 +++ shadow/81341.tmp.23105 2007-04-09 17:20:28.000000000 -0400 @@ -0,0 +1,85 @@ +Bug#: 81341 +Product: Mono: Class Libraries +Version: 1.2 +OS: Debian Woody +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Wishlist +Component: Sys.XML +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: null reference exception in XmlSerializer constructor + +Description of Problem: + +XmlSerializer throws a NullReferenceException while attempting to serialize +type 'IList<string>'. Code compiled using Visual Studio 2005, .NET +Framework 2.0.50727. Executed on linux kernel 2.6.8 with mono +1.2.3.50.20070406. + +Steps to reproduce the problem: +1. Build the following program in Visual Studio 2005 + +using System; +using System.Collections.Generic; +using System.Text; + +namespace ConsoleApplication { + class Program { + static void Main(string[] args) { + System.Xml.Serialization.XmlSerializer s = new +System.Xml.Serialization.XmlSerializer(typeof(IList<string>)); + } + } +} + +2. From linux, run 'mono ConsoleApplication.exe' + + +Actual Results: + +Unhandled Exception: System.NullReferenceException: Object reference not +set to an instance of an object + at System.Xml.Serialization.TypeData.get_ListItemType () [0x001b1] in +/home/geoff/mono-1.2.3.50.20070406/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs:297 + at System.Xml.Serialization.TypeData.get_ListItemTypeData () [0x00018] in +/home/geoff/mono-1.2.3.50.20070406/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs:251 + + at System.Xml.Serialization.TypeData..ctor (System.Type type, +System.String elementName, Boolean isPrimitive, +System.Xml.Serialization.TypeData mappedType, +System.Xml.Schema.XmlSchemaPatternFacet facet) [0x00000] + at System.Xml.Serialization.TypeData..ctor (System.Type type, +System.String elementName, Boolean isPrimitive) [0x00000] + at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type +runtimeType, System.String xmlDataType) [0x002a1] in +/home/geoff/mono-1.2.3.50.20070406/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:227 + + at System.Xml.Serialization.TypeTranslator.GetTypeData (System.Type type) +[0x00000] in +/home/geoff/mono-1.2.3.50.20070406/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs:151 + + at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping +(System.Type type, System.Xml.Serialization.XmlRootAttribute root, +System.String defaultNamespace) [0x0003d] in +/home/geoff/mono-1.2.3.50.20070406/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs:192 + + at System.Xml.Serialization.XmlSerializer..ctor (System.Type type, +System.Xml.Serialization.XmlAttributeOverrides overrides, System.Type[] +extraTypes, System.Xml.Serialization.XmlRootAttribute root, System.String +defaultNamespace) [0x00000] + at System.Xml.Serialization.XmlSerializer..ctor (System.Type type) [0x00000] + at ConsoleApplication.Program.Main (System.String[] args) [0x00000] + + + +How often does this happen? + +Always on linux with mono. Never on native win32. +Also occurs when built on linux using 'gmcs'. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
