XmlDocumentationProvider - "output char buffer is too small to contain the decoded characters" #529

Open
opened 2017-04-19 21:53:48 -05:00 by robdcgnx · 0 comments
robdcgnx commented 2017-04-19 21:53:48 -05:00 (Migrated from github.com)

string file = "Cognex.Designer.Core.xml";
var provider = new XmlDocumentationProvider(file);

throws an ArgumentException when attempting load the attached xml into the XmlDocumentationProvider.

*Had to rename it to .txt instead of .xml
Cognex.Designer.Core.txt

Using 5.5.1 pulled from nuget.org

The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderExceptionFallback'.
Parameter name: chars
at System.Text.Encoding.ThrowCharsOverflow()
at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded)
at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder)
at System.Text.DecoderNLS.Convert(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush, Int32& bytesUsed, Int32& charsUsed, Boolean& completed)
at System.Text.DecoderNLS.Convert(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Int32 charCount, Boolean flush, Int32& bytesUsed, Int32& charsUsed, Boolean& completed)
at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.LinePositionMapper.GetPositionForLine(Int32 line)
at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.ReadMembersSection(XmlTextReader reader, LinePositionMapper linePosMapper, List`1 indexList)
at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.ReadXmlDoc(XmlTextReader reader)
at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider..ctor(String fileName)
at XmlDocProviderBug.Program.Main(String[] args) in C:\Users\rdunbar\Desktop\Temp\XmlDocProviderBug\XmlDocProviderBug\Program.cs:line 15
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()

string file = "Cognex.Designer.Core.xml"; var provider = new XmlDocumentationProvider(file); throws an ArgumentException when attempting load the attached xml into the XmlDocumentationProvider. *Had to rename it to .txt instead of .xml [Cognex.Designer.Core.txt](https://github.com/icsharpcode/NRefactory/files/939608/Cognex.Designer.Core.txt) Using 5.5.1 pulled from nuget.org The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderExceptionFallback'. Parameter name: chars at System.Text.Encoding.ThrowCharsOverflow() at System.Text.Encoding.ThrowCharsOverflow(DecoderNLS decoder, Boolean nothingDecoded) at System.Text.UTF8Encoding.GetChars(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, DecoderNLS baseDecoder) at System.Text.DecoderNLS.Convert(Byte* bytes, Int32 byteCount, Char* chars, Int32 charCount, Boolean flush, Int32& bytesUsed, Int32& charsUsed, Boolean& completed) at System.Text.DecoderNLS.Convert(Byte[] bytes, Int32 byteIndex, Int32 byteCount, Char[] chars, Int32 charIndex, Int32 charCount, Boolean flush, Int32& bytesUsed, Int32& charsUsed, Boolean& completed) at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.LinePositionMapper.GetPositionForLine(Int32 line) at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.ReadMembersSection(XmlTextReader reader, LinePositionMapper linePosMapper, List`1 indexList) at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider.ReadXmlDoc(XmlTextReader reader) at ICSharpCode.NRefactory.Documentation.XmlDocumentationProvider..ctor(String fileName) at XmlDocProviderBug.Program.Main(String[] args) in C:\Users\rdunbar\Desktop\Temp\XmlDocProviderBug\XmlDocProviderBug\Program.cs:line 15 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart()
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-icsharpcode/NRefactory#529
No description provided.