Skip to content

Crash in git_diff_tree_to_index when calling Repository.RetrieveStatus #1755

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

Open
hybridherbst opened this issue Jan 27, 2020 · 1 comment
Open

Comments

@hybridherbst
Copy link

hybridherbst commented Jan 27, 2020

I originally raised this bug with libgit2 directly but response was that this is in fact a libgit2sharp error.
libgit2/libgit2#5363

Reproduction steps

Use Repository.RetrieveStatus from libgit2sharp from inside Unity3D editor script.

  1. download this: libgit2-git_diff_tree_to_index-Crash.zip
  2. download Unity 2019.3.0f5 (other versions crash as well)
  3. open the above project
  4. select menu item "Git Error/RetrieveStatus - CRASH"
  5. note native crash, with the log below

Expected behavior

No crash, instead returns RepositoryStatus

Actual behavior

git2-106a5f2.dll caused an Access Violation (0xc0000005)
  in module git2-106a5f2.dll at 0033:7cb4ae65.

Stack Trace of Crashed Thread 9380:
0x00007FFC7CB4AE65 (git2-106a5f2) git_diff_tree_to_index
0x00007FFC7CBB4B09 (git2-106a5f2) git_status_list_new
0x0000028C392EADBF (LibGit2Sharp) LibGit2Sharp.Core.NativeMethods.git_status_list_new()
0x0000028C392EAB9B (LibGit2Sharp) LibGit2Sharp.Core.Proxy.git_status_list_new()
0x0000028C392E57FB (LibGit2Sharp) LibGit2Sharp.RepositoryStatus..ctor()
0x0000028C392E49FB (LibGit2Sharp) LibGit2Sharp.Repository.RetrieveStatus()

Version of LibGit2Sharp (release number or SHA1)

git2-106a5f2, but also happens with e.g. git2-7ce88e6 (happened with all versions I tried).

Operating system(s) tested; .NET runtime tested

Windows 10

@EternalSunLhx
Copy link

I'm having the same issue

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