Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

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

Open
robdcgnx opened this issue Apr 20, 2017 · 0 comments

Comments

@robdcgnx
Copy link

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()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant