[Mono-list] NullReferenceException at System.Xml.Serialization.XmlSerializer

Daniel Lo Nigro lists at dan.cx
Thu Jan 10 21:12:47 UTC 2013


Might still be worth opening a bug, so other users can find it and add more
info if they're also experiencing it :)

---
Regards,
Daniel

Sent from my phone - please excuse any typos.
On 11/01/2013 12:42 AM, "Esben Laursen" <hyber at hyber.dk> wrote:

> Den 09-01-2013 18:56, Andres G. Aragoneses skrev:
>
>> On 09/01/13 17:21, Esben Laursen wrote:
>>
>>> Hi All,
>>>
>>> I sometimes get this execption to the console on my app. I have not
>>> really identified what part of my code that is generating the exception
>>> (I use xml serializers extensively). The app does not crash and I am
>>> fairly sure that I have wrapped all the parts of my code in a try/catch..
>>>
>>> Here is the output to the console.
>>>
>>> Serializer could not be generated
>>> System.NullReferenceException: Object reference not set to an instance
>>> of an object
>>>    at System.Xml.Serialization.**TypeData.ToCSharpName (System.Type
>>> type,
>>> Boolean full) [0x00000] in <filename unknown>:0
>>>    at System.Xml.Serialization.**TypeData.get_CSharpFullName ()
>>> [0x00000]
>>> in <filename unknown>:0
>>>    at
>>> System.Xml.Serialization.**SerializationCodeGenerator.**
>>> GenerateReadObject
>>> (System.Xml.Serialization.**XmlTypeMapping typeMap) [0x00000] in
>>> <filename
>>> unknown>:0
>>>    at System.Xml.Serialization.**SerializationCodeGenerator.**
>>> GenerateReader
>>> (System.String readerClassName, System.Collections.ArrayList maps)
>>> [0x00000] in <filename unknown>:0
>>>    at
>>> System.Xml.Serialization.**SerializationCodeGenerator.**
>>> GenerateSerializers
>>> (System.IO.TextWriter writer) [0x00000] in <filename unknown>:0
>>>    at System.Xml.Serialization.**XmlSerializer.**GenerateSerializers
>>> (System.Xml.Serialization.**GenerationBatch batch,
>>> System.CodeDom.Compiler.**CompilerParameters cp) [0x00000] in <filename
>>> unknown>:0
>>>
>>> I am running mono 3.0.1 complied from source on a Fedora Core..
>>>
>>> Can any of you guys identify if this is a "bug" in mono or in my code..
>>> (and yes I might send something "wrong" into the serializer :-)
>>>
>>> Hope you can help..
>>>
>>
>>
>> No matter how wrong you think the value to the serializer is, a
>> NullReferenceException should never be generated from inside any class
>> library, so this is likely a mono bug. File it with a minimal testcase in
>> http://bugzilla.xamarin.com/
>>
>>
> My problem is that is only happens from time to time. I have no overview
> when it happens and when it does not. Once I have time, I will try and make
> a small test that actually serializes over and over to check if I can make
> it fail.
>
> Should I still open a bug, even though I cannot submit a testcase?
>
> Cheers
>
> Esben
> ______________________________**_________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/**mailman/listinfo/mono-list<http://lists.ximian.com/mailman/listinfo/mono-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-list/attachments/20130111/2641fda1/attachment.html>


More information about the Mono-list mailing list