-
Notifications
You must be signed in to change notification settings - Fork 894
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
Intermittent access violation when calling Repository.RetreiveStatus #1711
Comments
Stack Trace for exception, when it occurs. Hope this helps. at LibGit2Sharp.Core.NativeMethods.git_status_list_new(git_status_list*& git_status_list, git_repository* repo, GitStatusOptions options) |
To look at the important background information first: are you re-using a |
The method that encapsulates this code is not itself asynchronous, but it is being executed within a background thread. This particular Repository instance is instantiated and disposed within the body of the method and is not being shared. With that being said, there are other background threads interacting with the targetted Git repository (one for branches, one for status, etc.) but each one would create and dispose of its own instance of the Repository class as required. In other words, no instances of the Repository class are shared, but it is possible that multiple instances of the Repository class could be active and interacting with the targeted Git repo at any given time.
|
As earlier posts in this thread implied this might be a threading issue, I encapsulated all of my calls to LibGit2Sharp in a single client class and used a lock to ensure that only only one call to the repository could occur at an given time. Unfortunately, this did not work and the intermittent access violation that I was having when calling the RetrieveStatus method is still occurring. |
This is still on ongoing problem that occurs at least a couple times every day. |
I have an access violation consistantly since earlier this week when calling
This method is being called from another thread then the main thread in a UI, but as it has its own instance of repository this has never been an issue; until it spontaniously occurred earlier this week. I also have a CLI tool to perform a series of repo related tasks, in this instance a command to close a feature branch. It also throws:
Here I can see RetrieveStatus() being the problem as well, and the other interactions working just fine. Note that
Both examples have been without any issues for months now. And without change on my part they started failing this week. |
Yup; updating to that preview fixed it, indeed. Thanks! |
We are receiving an intermittent Access Violation exception when invoking Repository.RetrieveStatus. It does not happen often, but it is a fatal error when it does occur. The code looks something like this:
Version of LibGit2Sharp is 0.26.0
Operating system(s) tested is Windows 10 Pro (10.0.17763)
.NET runtime tested is 4.7.1
The text was updated successfully, but these errors were encountered: