VisualStudio-ColorCoder icon indicating copy to clipboard operation
VisualStudio-ColorCoder copied to clipboard

NullReferenceException

Open EFLFE opened this issue 5 years ago • 1 comments

Hello. Visual studio shows an error when I open the project for the first time.

This window error window

It always shows that error when opening a file with this code:

#if INF
...
#endif
/*
...
*/

The last text from ActivityLog.xml:

  <entry>
    <record>561</record>
    <time>2020/06/29 13:37:37.786</time>
    <type>Error</type>
    <source>Editor or Editor Extension</source>
    <description>System.NullReferenceException: Object reference not set to an instance of an object.&#x000D;&#x000A;   at Microsoft.CodeAnalysis.CSharp.CSharpExtensions.Kind(SyntaxNode node)&#x000D;&#x000A;   at ColorCoder.Extensions.CSharpExtensions.IsCSharpAttributeSyntaxKind(SyntaxNode node) in C:\Users\Hamid\source\VisualStudio-ColorCoder\ColorCoder\Extensions\CSharpExtensions.cs:line 21&#x000D;&#x000A;   at ColorCoder.ColorCoderCore.ColorCoderTaggerServices.GetExpression(SyntaxNode node) in C:\Users\Hamid\source\VisualStudio-ColorCoder\ColorCoder\ColorCoderCore\ColorCoderTaggerServices.cs:line 42&#x000D;&#x000A;   at ColorCoder.ColorCoderCore.ColorCoderTaggerServices.&lt;GetClassificationTags&gt;d__2.MoveNext() in C:\Users\Hamid\source\VisualStudio-ColorCoder\ColorCoder\ColorCoderCore\ColorCoderTaggerServices.cs:line 65&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__39.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A;   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)</description>
  </entry>

Visual Studio 2017, Color Coder v1.1.0

EFLFE avatar Jun 29 '20 13:06 EFLFE

I've tried to reproduce the issue with the piece of code you've provided, but I didn't encountered any errors. Could you share a file or a project where this happens?

HamidMosalla avatar Jul 11 '20 14:07 HamidMosalla