-
Notifications
You must be signed in to change notification settings - Fork 280
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
GTRepository dealloc crash #689
Comments
Actually, I sent a PR: #690 |
Hmm, we're not supposed to care about the repository having a workdir, and I think that your proposed fix leaks the How you've constructed the GTRepository/git_repository itself would be most helpful, right now this could also just be a stray memory write corrupting something in the git_repository. If it's openen from a worktree (a.k.a |
I’m using an Opaque Pointer to create my GTRepository. I will try with a URL, to see if anything changes |
Is that specific to a given repository, or does it happen on any of them ? Could you whip up a test case maybe ? I don't understand what you mean by Opaque Pointer, and there are a few different ways to get to a GTRepository, some which might not be well-supported (using |
The OpaquePointer I’m talking about is created by SwiftGit2, a small git library for Swift. |
When the system calls
-[GTRepository dealloc]
and the git_repository is empty, but still exists, the app crashes.Here is a screenshot of the debug session:
What I would suggest is to change:
objective-git/ObjectiveGit/GTRepository.m
Lines 110 to 115 in b3af3f3
By simply checking if the
workdir
property of thegit_repository
object isn't empty before cleaning the repo.I'm not an Objective-C developer, so I let you guys do that for me (or just show me how to do it, and I'll submit a PR)
The text was updated successfully, but these errors were encountered: