Mono.Addins Localizer attribute causes exception when saving addin description
garuma opened this issue · 0 comments
garuma commented
Using the Localizer tag directly in source code (aka [assembly: AddinLocalizer (typeof (LocalizerType))]
) causes the following exception when trying to pack an addin:
System.NullReferenceException: Object reference not set to an instance of an object
at System.Xml.XmlNode.SplitName (System.String name, System.String& prefix, System.String& localName) [0x00000] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlNode.cs:1074
at System.Xml.XmlDocument.CreateElement (System.String name) [0x0000c] in /Users/builder/data/lanes/4992/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlDocument.cs:533
at Mono.Addins.Description.ExtensionNodeDescription.SaveXml (System.Xml.XmlElement parent) [0x00008] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/ExtensionNodeDescription.cs:200
at Mono.Addins.Description.AddinDescription.SaveXml () [0x0028c] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:835
at Mono.Addins.Description.AddinDescription.Save () [0x00013] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:753
at Mono.Addins.Description.AddinDescription.Save (System.String fileName) [0x00007] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Description/AddinDescription.cs:736
at Mono.Addins.Database.AddinDatabase.ParseAddin (Mono.Addins.IProgressStatus progressStatus, System.String domain, System.String file, System.String outFile, System.Boolean inProcess) [0x00109] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Database/AddinDatabase.cs:1463
at Mono.Addins.AddinRegistry.ParseAddin (Mono.Addins.IProgressStatus progressStatus, System.String file, System.String outFile) [0x00000] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins/AddinRegistry.cs:701
at Mono.Addins.Database.RemoteSetupDomain.GetAddinDescription (Mono.Addins.IProgressStatus monitor, System.String registryPath, System.String startupDir, System.String addinsDir, System.String databaseDir, System.String file, System.String outFile) [0x00012] in /Users/builder/data/lanes/5184/28efc89b/source/monodevelop/main/external/mono-addins/Mono.Addins/Mono.Addins.Database/SetupDomain.cs:131
at (wrapper remoting-invoke-with-check) Mono.Addins.Database.RemoteSetupDomain:GetAddinDescription (Mono.Addins.IProgressStatus,string,string,string,string,string,string)
at (wrapper xdomain-dispatch) Mono.Addins.Database.RemoteSetupDomain:GetAddinDescription (object,byte[]&,byte[]&,string,string,string,string,string,string)
The problem seems to be that the extension node is created without a proper name causing this issue: https://github.com/mono/mono-addins/blob/master/Mono.Addins/Mono.Addins.Database/AddinScanner.cs#L844-L860