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.

Unhandled AccessViolationException crashes Visual Studio

See original GitHub issue

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()

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
laurentkempecommented, Oct 20, 2017

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

1reaction
laurentkempecommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio 2019 is crashing when trying to load a ...
Description: The process was terminated due to an unhandled exception. Exception Info: System.AccessViolationException at System.Data.OleDb.
Read more >
devenv.exe crash after debugging - visual studio
I got a System.AccessViolationException for the crash. And I found something strange when debugging: Can't get any variables in my program, even ...
Read more >
C# .NET 4.7.2 AccessViolationException Crash
Some of my users on Windows 10 1803 are crashing with an unhandled AccessViolationException "Attempted to read or write protected memory.
Read more >
[Help] Every .NET application crashes ...
NET application crashes (AccessViolationException) ... I first noticed this with Visual Studio 2019 & Visual Studio Installer.
Read more >
Why does Visual Studio on Windows 10 crash with System. ...
When I look at the Event Viewer, there is always an error, and the stack trace always indicates a System.AccessViolationException. Here's a ...
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