Skip to content

Unhandled AccessViolationException crashes Visual Studio #135

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

Closed
martinskuta opened this issue Oct 19, 2017 · 6 comments
Closed

Unhandled AccessViolationException crashes Visual Studio #135

martinskuta opened this issue Oct 19, 2017 · 6 comments

Comments

@martinskuta
Copy link

martinskuta commented Oct 19, 2017

Cannot really reproduce as the issue seems random, but it happens most of the time when visual studio is idle. Last time it crashed when I had just VS opened with a document with some changes and I locked PC for 5 minutes and when I came back unlocked pc and activated VS it crashed with the error log below, but it seems not really related to any specific action it crashed once just while working within VS with same error.

I am using GitDiffMargin 3.5.2.54 installed from VS marketplace running in VS 2017 version 15.4.0.

Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
   at LibGit2Sharp.Core.NativeMethods.git_status_file(LibGit2Sharp.FileStatus ByRef, LibGit2Sharp.Core.git_repository*, LibGit2Sharp.Core.FilePath)
   at LibGit2Sharp.Core.Proxy.git_status_file(LibGit2Sharp.Core.Handles.RepositoryHandle, LibGit2Sharp.Core.FilePath)
   at LibGit2Sharp.Repository.RetrieveStatus(System.String)
   at GitDiffMargin.Git.GitCommands+<GetGitDiffFor>d__3.MoveNext()
   at System.Collections.Generic.List`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]..ctor(System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at System.Linq.Enumerable.ToList[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1<System.__Canon>)
   at GitDiffMargin.Core.DiffUpdateBackgroundParser.ReParseImpl()
   at GitDiffMargin.Core.BackgroundParser.ReParse()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
   at System.Threading.Tasks.Task.ExecutionContextCallback(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef)
   at System.Threading.Tasks.Task.ExecuteEntry(Boolean)
   at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
@laurentkempe
Copy link
Owner

laurentkempe commented Oct 20, 2017

Thanks @martinskuta for the issue logging.
I will update to LibGit2Sharp 0.24.0 and LibGit2Sharp.NativeBinaries 1.0.185 and provide you a version to install so that you can try to see if the issue is fixed with those updates

@laurentkempe
Copy link
Owner

laurentkempe commented Oct 20, 2017

Please @martinskuta, could you uninstall the current version you are using from Visual Studio.
Then, download the file GitDiffMargin.vsix.zip, rename it to GitDiffMargin.vsix and double click it to install GitDiffMargin with the updated LibGit2Sharp.

Finally let me know if it solves the issue.
Thanks a lot.

@laurentkempe
Copy link
Owner

laurentkempe commented Oct 20, 2017

Here is another one with a new GitDiffMargin version so that VS doesn't update it with the one from their servers GitDiffMargin.vsix.zip

@martinskuta
Copy link
Author

martinskuta commented Oct 20, 2017

Here is another one with a new GitDiffMargin version so that VS doesn't update it with the one from their servers GitDiffMargin.vsix.zip

I used it and now I get BadImageFormatException everytime. Wrong version of library? x64 instead of x86?

@laurentkempe
Copy link
Owner

x64 instead of x86?

Exactly! 😢 I re-created one and changed it in the previous comment

@laurentkempe
Copy link
Owner

Let's hope that one works for you finally because I didn't had any crash here - GitDiffMargin.vsix.zip

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

No branches or pull requests

2 participants