libgit2 / libgit2/libgit2sharp
TypeInitializationException - unable to load shared library git2-106a5f2
未關閉
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 3.5k
- 分支
- 925
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Reproduction steps
Repository repo = new Repository();
Expected behavior
Program should not crash
Actual behavior
Program crashes with the following text:
An exception of type 'System.TypeInitializationException' occured in LibGit2Sharp.dll but was not handled in user code: 'The type initializer for 'LibGit2Sharp.Core.Nativemethods' threw an exception.'
libgit2-106a5f2: cannot open shared object file: No such file or directory
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods..cctor()
Version of LibGit2Sharp (release number or SHA1)
- 0.26.2
- 0.27.0-preview-0182
Operating system(s) tested; .NET runtime tested
- OS: Linux Mint
- Kernel: 5.15.0-41
- .NET SDK / runtime: 6.0.110
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 Repository 建構函式開始,沿著堆疊追蹤中顯示的 NativeMethods.InitializeNativeLibrary() 路徑,在使用 .NET 6 和所列 LibGit2Sharp 版本的 Linux Mint 上重現問題。調查無法載入共用程式庫 git2-106a5f2 的原因;當提供的 Repository 建立操作在回報的環境中不再當機時,即視為完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, git
- 領域
- devtools
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100