I'm running Visual Assist v10.7.1940.0, with Visual Studio 2012 Update 3 (although I have been getting this exception in previous versions of VS..
Occasionally, usually once or twice per day, I'm getting an exception in VS from an addon, and I believe it is from VAX.. The error is as follows:
969 ERROR System.ArgumentNullException: Value cannot be null. Parameter name: targetSnapshot at Microsoft.VisualStudio.Text.SnapshotSpan.TranslateTo(ITextSnapshot targetSnapshot, SpanTrackingMode spanTrackingMode) at Microsoft.VisualC.CppOutliner.GetTags(NormalizedSnapshotSpanCollection spans) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__16.MoveNext() Editor or Editor Extension 2013/08/05 17:07:26.500
970 ERROR System.ArgumentNullException: Value cannot be null. Parameter name: targetSnapshot at Microsoft.VisualStudio.Text.SnapshotSpan.TranslateTo(ITextSnapshot targetSnapshot, SpanTrackingMode spanTrackingMode) at Microsoft.VisualC.CppOutliner.GetTags(NormalizedSnapshotSpanCollection spans) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__16.MoveNext() Editor or Editor Extension 2013/08/05 17:07:26.537
This usually happens when I open an existing c++ header or source file.. I believe its in relation to the source outlining code; when the exception happens outlining is unavailable in the given source file that was opened when the exception happens.. The exception references the ActivityLog.xml which is where I pulled the exception details above.
This isn't necessarily a breaking exception; VAX and VS continue to work as normal, and other files still have outlining available. Just wanted to give a heads up to see if this bug can be fixed..
I believe the problem is due to an invalid cache built by Visual Studio. If you delete the cache it should fix the issue:
Close Visual Studio and then delete all files including sub directories: C:\\Users\\<username>\\AppData\\Local\\Microsoft\\VisualStudio\\11.0\\ComponentModelCache\\*
and all .cache files in the following directory and its subdirectories: C:\\Users\\<username>\\AppData\\Local\\Microsoft\\VisualStudio\\11.0\\Extensions\\*.cache
Visual Studio will rebuild those files when it starts up, and should resolve your problem.