Bug 33436 - Serializer could not be generated
Summary: Serializer could not be generated
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.XML ()
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2015-08-27 15:49 UTC by farseer_yhb
Modified: 2015-08-28 03:38 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description farseer_yhb 2015-08-27 15:49:48 UTC
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 see this exception printed to the console when i run my application. 100% reproducible.
The program doesn't crash with it. It's annoying to see this getting printed every time.

I haven't identified which part of my code causes this. I'm trying to make a test app to reproduce it. Will upload when i have it.
Comment 1 Marek Safar 2015-08-28 03:38:53 UTC
This should be fixed in Mono 4.2