[Mono-bugs] [Bug 51680][Wis] New - crash when serializing array wth 'typed' XmlArrayItem

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 19 Jan 2004 13:49:26 -0500 (EST)


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 vargaz@freemail.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=51680

--- shadow/51680	2004-01-19 13:49:26.000000000 -0500
+++ shadow/51680.tmp.8032	2004-01-19 13:49:26.000000000 -0500
@@ -0,0 +1,110 @@
+Bug#: 51680
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: orphennui@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: crash when serializing array wth 'typed' XmlArrayItem
+
+I get a crash when I set 
+
+[XmlArrayItem (typeof (Daybook.MenuItem))] 
+or 
+[XmlArrayItem ("MenuItem", typeof (Daybook.MenuItem))]
+
+on an ArrayList that is serialized.  It crashes when XmlAttributes calls
+GetCustomAttributes on the ArrayList...
+
+** (Daybook:19090): WARNING **: Cannot load type 'Daybook'
+ 
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+in (unmanaged) /usr/lib/libmono.so.0(mono_class_from_mono_type+0x8)
+[0x400c24f8]in (unmanaged) /usr/lib/libmono.so.0(mono_type_get_object+0x1d)
+[0x40080f61]
+in (unmanaged) /usr/lib/libmono.so.0 [0x400821e9]
+in (unmanaged) /usr/lib/libmono.so.0 [0x400827dd]
+in (unmanaged) /usr/lib/libmono.so.0(mono_custom_attrs_construct+0x7c)
+[0x40082928]
+in (unmanaged) /usr/lib/libmono.so.0(mono_reflection_get_custom_attrs+0xd8)
+[0x40082f10]
+in <0x000a4> System.MonoCustomAttrs:from_cache
+(System.Reflection.ICustomAttributeProvider)
+in <0x00054> System.MonoCustomAttrs:GetCustomAttributes
+(System.Reflection.ICustomAttributeProvider,bool)
+in <0x00012> System.Reflection.MonoField:GetCustomAttributes (bool)
+in <0x000e1> System.Xml.Serialization.XmlAttributes:.ctor
+(System.Reflection.ICustomAttributeProvider)
+in <0x0034f>
+System.Xml.Serialization.XmlReflectionImporter:GetReflectionMembers
+(System.Type)
+in <0x001d9>
+System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00106>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00166>
+System.Xml.Serialization.XmlReflectionImporter:ImportElementInfo
+(string,string,System.Type,System.Xml.Serialization.XmlTypeMapMemberElement,System.Xml.Serialization.XmlAttributes)
+in <0x00abe> System.Xml.Serialization.XmlReflectionImporter:CreateMapMember
+(System.Xml.Serialization.XmlReflectionMember,string)
+in <0x002d8>
+System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00106>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x0001c>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,string)
+in <0x0065f>
+System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00106>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x0001e>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping (System.Type)
+in <0x00714>
+System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00106>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00166>
+System.Xml.Serialization.XmlReflectionImporter:ImportElementInfo
+(string,string,System.Type,System.Xml.Serialization.XmlTypeMapMemberElement,System.Xml.Serialization.XmlAttributes)
+in <0x00abe> System.Xml.Serialization.XmlReflectionImporter:CreateMapMember
+(System.Xml.Serialization.XmlReflectionMember,string)
+in <0x002d8>
+System.Xml.Serialization.XmlReflectionImporter:ImportClassMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x00106>
+System.Xml.Serialization.XmlReflectionImporter:ImportTypeMapping
+(System.Type,System.Xml.Serialization.XmlRootAttribute,string)
+in <0x000f0> System.Xml.Serialization.XmlSerializer:.ctor
+(System.Type,System.Xml.Serialization.XmlAttributeOverrides,System.Type[],System.Xml.Serialization.XmlRootAttribute,string)
+in <0x0001f> System.Xml.Serialization.XmlSerializer:.ctor
+(System.Type,System.Type[])
+in <0x0006e> Daybook.ConfigManager:SaveConfig (Daybook.Backend)
+in <0x00093> Daybook.ConfigManager:SaveConfigs (System.Collections.ArrayList)
+in <0x0038d> Daybook.BackendManager:LoadBackends (System.Collections.ArrayList)
+in <0x00038> Daybook.BackendManager:.ctor ()
+in <0x0002d> Daybook.Daybook:.ctor ()
+in <0x00092> Daybook.Daybook:Main (string[])
+
+------- Additional Comments From vargaz@freemail.hu  2004-01-19 13:49 -------
+Please attach a complete testcase so someone who is not familiar with
+XML serialization but familiar with the runtime can have a shot at 
+fixing this bug.