libgit2 / libgit2/libgit2sharp
Fatal Error : System.AccessViolationException while cloning some repos with RecurseSubmodules on
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- C#
- Estrellas
- 3.5k
- Forks
- 925
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I have found out that some repos with the Rescurse Submodulo option flag set to true causes a FatalError System.AccessViolationException, the same repo with the flag on off works as expected
Tried cloning the repo using git client and was able to clone normally with and without the --recursive flag, so now I suspect is something related only to lib2git.
Reproduction steps
Try to clone : https://github.com/AIDungeon/AIDungeon with CloneOptions :
RecurseSubmodules = true
Expected behavior
Successfully clone the repo
Actual behavior
Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at LibGit2Sharp.Core.NativeMethods.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.GitBuf, LibGit2Sharp.Core.git_repository*, System.String)
at LibGit2Sharp.Core.NativeMethods.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.GitBuf, LibGit2Sharp.Core.git_repository*, System.String)
at LibGit2Sharp.Core.Proxy.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.RepositoryHandle, System.String)
at LibGit2Sharp.Repository.RecursivelyCloneSubmodules(LibGit2Sharp.CloneOptions, System.String, Int32)
at LibGit2Sharp.Repository.Clone(System.String, System.String, LibGit2Sharp.CloneOptions)
Version of LibGit2Sharp (release number or SHA1)
0.26.2
Operating system(s) tested; .NET runtime tested
Windows 10
.Net Core 3.1
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en Repository.RecursivelyCloneSubmodules y sigue Proxy.git_submodule_resolve_url hasta la llamada nativa a git_submodule_resolve_url que se muestra en el stack trace. Reproduce el clonado de AIDungeon en Windows con RecurseSubmodules habilitado y, a continuación, verifica que el clonado recursivo se complete sin la AccessViolationException.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp, git
- Área
- devtools
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100