question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visual Studio 2010 - Exception thrown on compile error

See original GitHub issue

The latest 2.2.x updates seem to have broken something in Visual Studio 2010. When I get a compile error there is a message box stating that an exception has been thrown. Below is an excerpt from the activity log when the error occurs.

ActivityLog.xml output: <entry> <record>423</record> <time>2016/01/25 00:15:14.668</time> <type>Error</type> <source>Editor or Editor Extension</source> <description>System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.BrushesEqual(Brush brush, Brush other) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.IsEqual(TextFormattingRunProperties other) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.<>c__DisplayClass1.<FindOrCreateProperties>b__0(TextFormattingRunProperties other) at System.Collections.Generic.List1.Find(Predicate1 match) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.FindOrCreateProperties(TextFormattingRunProperties properties) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.CreateTFRPFromRD(ResourceDictionary dictionary) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetTextProperties(IClassificationType classificationType) at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.GetTextProperties(IClassificationType classificationType) at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.CreateClassifiedRuns(SnapshotSpan span, IClassifier classifier, IClassificationFormatMap classificationFormatMap) at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.Create(ITextAndAdornmentCollection elements, ITextSnapshot sourceSnapshot, IClassifier classifier, IClassificationFormatMap classificationFormatMap) at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.Format(ITextAndAdornmentCollection elements, ITextSnapshotLine line) at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.FormatLineInVisualBuffer(ITextSnapshotLine visualLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.FormatSnapshotLine(ITextSnapshotLine visualLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoLayoutDown(ITextSnapshotLine visualLine, Double referenceLine, Double effectiveViewportHeight, Double& distanceBelowReferenceLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoCompleteLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportHeight, Double& referenceLine, Double& distanceAboveReferenceLine, Double& distanceBelowReferenceLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.InnerPerformLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshot(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshotOnUIThread(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnVisualBufferChanged(Object sender, TextContentChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args)</description> </entry> <entry> <record>424</record> <time>2016/01/25 00:15:15.416</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.VisualStudio.Text.Formatting.TextFormattingRunProperties.BrushesEqual(Brush brush, Brush other)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.IsEqual(TextFormattingRunProperties other)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.&lt;&gt;c__DisplayClass1.&lt;FindOrCreateProperties&gt;b__0(TextFormattingRunProperties other)&#x000D;&#x000A; at System.Collections.Generic.List1.Find(Predicate1 match)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.FindOrCreateProperties(TextFormattingRunProperties properties)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.CreateTFRPFromRD(ResourceDictionary dictionary)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetTextProperties(IClassificationType classificationType)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.GetTextProperties(IClassificationType classificationType)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.CreateClassifiedRuns(SnapshotSpan span, IClassifier classifier, IClassificationFormatMap classificationFormatMap)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.Create(ITextAndAdornmentCollection elements, ITextSnapshot sourceSnapshot, IClassifier classifier, IClassificationFormatMap classificationFormatMap)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.Format(ITextAndAdornmentCollection elements, ITextSnapshotLine line)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.FormatLineInVisualBuffer(ITextSnapshotLine visualLine)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.FormatSnapshotLine(ITextSnapshotLine visualLine)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoLayoutDown(ITextSnapshotLine visualLine, Double referenceLine, Double effectiveViewportHeight, Double&amp; distanceBelowReferenceLine)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoCompleteLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportHeight, Double&amp; referenceLine, Double&amp; distanceAboveReferenceLine, Double&amp; distanceBelowReferenceLine)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.InnerPerformLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshot(TextSnapshotChangedEventArgs e)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshotOnUIThread(TextSnapshotChangedEventArgs e)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnVisualBufferChanged(Object sender, TextContentChangedEventArgs e)&#x000D;&#x000A; at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler1 eventHandlers, TArgs args)</description> </entry> <entry> <record>425</record> <time>2016/01/25 00:15:20.920</time> <type>Error</type> <source>Editor or Editor Extension</source> <description>System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.BrushesEqual(Brush brush, Brush other) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.IsEqual(TextFormattingRunProperties other) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.<>c__DisplayClass1.<FindOrCreateProperties>b__0(TextFormattingRunProperties other) at System.Collections.Generic.List1.Find(Predicate1 match) at Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties.FindOrCreateProperties(TextFormattingRunProperties properties) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.CreateTFRPFromRD(ResourceDictionary dictionary) at Microsoft.VisualStudio.Text.Classification.Implementation.ClassificationFormatMap.GetTextProperties(IClassificationType classificationType) at Microsoft.VisualStudio.Text.Classification.Implementation.ViewSpecificFormatMap.GetTextProperties(IClassificationType classificationType) at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.CreateClassifiedRuns(SnapshotSpan span, IClassifier classifier, IClassificationFormatMap classificationFormatMap) at Microsoft.VisualStudio.Text.Formatting.Implementation.NormalizedSpanGenerator.Create(ITextAndAdornmentCollection elements, ITextSnapshot sourceSnapshot, IClassifier classifier, IClassificationFormatMap classificationFormatMap) at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.Format(ITextAndAdornmentCollection elements, ITextSnapshotLine line) at Microsoft.VisualStudio.Text.Formatting.Implementation.FormattedLineSource.FormatLineInVisualBuffer(ITextSnapshotLine visualLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.FormatSnapshotLine(ITextSnapshotLine visualLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoLayoutDown(ITextSnapshotLine visualLine, Double referenceLine, Double effectiveViewportHeight, Double& distanceBelowReferenceLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.DoCompleteLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportHeight, Double& referenceLine, Double& distanceAboveReferenceLine, Double& distanceBelowReferenceLine) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.InnerPerformLayout(SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot, SnapshotPoint anchorPosition, Double verticalDistance, ViewRelativePosition relativeTo, Double effectiveViewportWidth, Double effectiveViewportHeight) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.PerformLayout(ITextSnapshot newSnapshot, ITextSnapshot newVisualSnapshot) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshot(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.AdvanceSnapshotOnUIThread(TextSnapshotChangedEventArgs e) at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnVisualBufferChanged(Object sender, TextContentChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)</description> </entry>

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
PhantomGrazzlercommented, Mar 29, 2016

The issue has been fixed in VisualAssistX in build 2093 ([VS2010] Fix for crash when VSColorOutput extension is enabled. (case=94928)). See http://www.wholetomato.com/features/whats-new.asp

0reactions
mike-wardcommented, Feb 29, 2016

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Manage exceptions with the debugger in Visual Studio
Visual Studio Code. An exception is an indication of an error state that occurs while a program is being executed. You can tell...
Read more >
Visual Studio 2010 error: "Exceptions has been thrown by ...
I was getting this error when I start the second IDE of VS 2010/2012 but when I restart the explorer.exe it works very...
Read more >
Solved: Vsual Studio 2010 Exception of type 'System. ...
Find answers to Vsual Studio 2010 Exception of type 'System.OutOfMemoryException' was thrown. from the expert community at Experts Exchange.
Read more >
Visual Studio Exception has been thrown by the target of ...
This error can be cause by many different situations and it is impossible to diagnose from the information provided.
Read more >
Errors reported when none exist (Visual Basic projects)
Open the solution your were working on yesterday without issue, compile a get 7355 errors with a build succeeeded output.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found