-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Find out why / when LibGit2Sharp is crashing #1315
Comments
We upgraded from LibGit2Sharp 0.22 to 0.24 in PR #1248. The upgrade was in order to fix #1244 (the Unfortunately after upgrading to v0.24, the crash #1306 started happening. This seemed to be fixed in PR #1311 by adding a I'm now thinking that 0.23.1 would be a better choice because it fixes both issues. The merged PR #1311 might prevent a crash (or make one less likely) in one place, but the same crash might happen elsewhere. |
@jcansdale, I just upgraded 2.3.4.54 (from the private build ref'd in #1244) on top of VS 15.4.4 (also newly upgraded). I tried to load a PR and the plug-in crashed all of VS. Here's the details from my event logs.
Also worth mentioning that this repro isn't consistent for me. VS closed and I was able to re-open the PR without issue. |
Ugh, that's terrible. No, I haven't seen this before. We haven't made any changes to |
We moved from v0.22 to v0.24. This crash seems to happen in v0.24 and v0.25-preview, but not v0.23.1 and below. For the moment we're planning to revert to use v0.23.1 (#1316). When executing inside of VS it crashes roughly 1/3 times on my machine. The above repro (#1315) can execute just a few iterations or 100s before it blows up. It seems very random. |
@bwishan thanks for the report and sorry about that! LibGit2Sharp v0.23 seems to be the sweet spot. Could you try the .vsix linked here: |
No problem! Let me know if there's anything I can do to help. |
I've also noticed this one happening randomly when running our tests (alas this is libgit2sharp v0.23.1).
|
I've just seen these crashes on the latest version, which uses libgit2sharp 0.23. |
@ethomson Since the crash is happening with 0.24.0, that release was before the .NET Standard changes were merged, so there must be something else going on. |
The crash when running |
@bording It seems that The strange thing is, this #1311 workaround does appear to fix it. I suspect the reason it works is that adding a |
Right. I'm also a bit concerned about that |
Here is a simplified version of what it's doing:
Were we leaking native resources when |
Bug is still present in version 26.0.0 |
Uh oh!
There was an error while loading. Please reload this page.
This investigation is related to the following issue
GitHub extension crashes when viewing pull requests: #1306
How to reproduce
Compile and run the following code in
Release
configuration.Eventually something like this will happen:
Here is another very common exception:
This only seems to happen when compiled in
Release
configuration. When compiled inDebug
configuration, it can run all 1000 iterations and never crash.The text was updated successfully, but these errors were encountered: