Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error thrown by Visual Studio #46

Open
radusun opened this issue Jan 23, 2019 · 3 comments
Open

Error thrown by Visual Studio #46

radusun opened this issue Jan 23, 2019 · 3 comments
Labels

Comments

@radusun
Copy link

radusun commented Jan 23, 2019

For some files, but always for those ones, Visual Studio throws an error:

An exception has been encountered. This may be caused by an extension.
You can get more information by examining the file
'C:\Users<USERNAME>\AppData\Roaming\Microsoft\VisualStudio\15.0_221550df\ActivityLog.xml'

This happens only when I double-click on a file under Changes in the TeamExplorer - Changes window. It is a git repository on which I want to show the Diff - window for that specific file.

If I disable your extension there is no error thrown. After re-enabling it, the error re-appears when I double click, but only on specific files.

Maybe for this kind of windows your extension should not do anything, just skip them.

I am using Visual Studio Professional 2017 15.9.5

If I can help you with more details just let me know; uploading the original file(s) may be problematic - but I am willing to do locally all kind of tests :)

Thanks,
radusun

@sharwell
Copy link
Member

I'm not able to reproduce this. Can you look in ActivityLog.xml for a stack trace of the error?

@sharwell sharwell added the bug label Jan 23, 2019
@radusun
Copy link
Author

radusun commented Jan 24, 2019

Hello Sam,

I've managed to make a simple solution in which I copied only the troubled file and created locally a git repository. In case you need to extract it in the original path, that was C:\TEMP then comes InheritanceMargin and so on So, in order to reproduce the error, you display the history of master, double click on last change to see the commit details then double click on CrashingFiles.cs to display the differences. The error message box should come immediately.

I've attached the archive of the solution and repository. Also, you can find inside a copy of ActivityLog.xml
(link removed)

Note: The error comes only once per Visual Studio session. Apparently it is working then without any problems. But, I've always experienced problems later with Visual Studio after that, which sooner or later will lead to an automatic restart of Visual Studio (because of an internal crash).

Thanks for your quick reply,
radusun

@sharwell
Copy link
Member

System.ArgumentException: The specified ITextSnapshot doesn't belong to the correct TextBuffer.
at Microsoft.VisualStudio.Text.SnapshotSpan.TranslateTo(ITextSnapshot targetSnapshot, SpanTrackingMode spanTrackingMode)
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<GetTagsForBuffer>d__39.MoveNext()
at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.<InternalGetTags>d__41.MoveNext()
at Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMargin`1.RefreshGlyphsOver(ITextViewLine textViewLine)
at Microsoft.VisualStudio.Text.Editor.Implementation.GlyphMargin`1.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

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

No branches or pull requests

2 participants