Skip to content
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

Lazygit crashed on adding github SSH remote #3512

Closed
mrvanes opened this issue Apr 22, 2024 · 2 comments
Closed

Lazygit crashed on adding github SSH remote #3512

mrvanes opened this issue Apr 22, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mrvanes
Copy link

mrvanes commented Apr 22, 2024

Describe the bug
Lazygit crashed when I replaced github SSH remote (because of a repository rename).

To Reproduce
Steps to reproduce the behavior:

  1. Activate remotes panel
  2. Remove all remotes from local clone (d)
  3. Add new remote (n, name: origin, url: github SSH link)
  4. See error
$ lg
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x81712e]

goroutine 820 [running]:
github.com/jesseduffield/lazygit/pkg/commands/models.(*Remote).RefName(...)
        /home/runner/work/lazygit/lazygit/pkg/commands/models/remote.go:11
github.com/jesseduffield/lazygit/pkg/commands/models.(*Remote).ID(...)
        /home/runner/work/lazygit/lazygit/pkg/commands/models/remote.go:15
github.com/jesseduffield/lazygit/pkg/commands/models.(*Remote).URN(0x410645?)
        /home/runner/work/lazygit/lazygit/pkg/commands/models/remote.go:19 +0xe
github.com/jesseduffield/lazygit/pkg/gui.(*StateAccessor).SetItemOperation(0xc000078830, {0xe59c80, 0x0}, 0x5)
        /home/runner/work/lazygit/lazygit/pkg/gui/gui.go:202 +0xae
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*InlineStatusHelper).WithInlineStatus.func2({0xe5f030, 0xc00065e018})
        /home/runner/work/lazygit/lazygit/pkg/gui/controllers/helpers/inline_status_helper.go:88 +0x8e
github.com/jesseduffield/lazygit/pkg/gui.NewGui.func5.(*AppStatusHelper).WithWaitingStatus.func1.1(0xc0007b2000?)
        /home/runner/work/lazygit/lazygit/pkg/gui/controllers/helpers/app_status_helper.go:65 +0x6f
github.com/jesseduffield/lazygit/pkg/gui/status.(*StatusManager).WithWaitingStatus(0xc0002b8a20, {0xd008fc, 0x8}, 0xc000292000, 0xc0003a1730)
        /home/runner/work/lazygit/lazygit/pkg/gui/status/status_manager.go:54 +0xb6
github.com/jesseduffield/lazygit/pkg/gui.NewGui.func5.(*AppStatusHelper).WithWaitingStatus.func1({0xe5eff8?, 0xc00088e100})
        /home/runner/work/lazygit/lazygit/pkg/gui/controllers/helpers/app_status_helper.go:64 +0xfa
github.com/jesseduffield/gocui.(*Gui).onWorkerAux(0x74b4ac?, 0xc00016e000?, {0xe5eff8?, 0xc00088e100?})
        /home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:680 +0x66
github.com/jesseduffield/gocui.(*Gui).OnWorker.func1()
        /home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:667 +0x2b
created by github.com/jesseduffield/gocui.(*Gui).OnWorker in goroutine 1
        /home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:666 +0x92

The remote actually was added to the clone.

Expected behavior
I would expect lazygit to accept the remote without crashing.

Version info:
commit=3675570a391b1a49ddd198b4c7e71e17701d4404, build date=2024-03-23T09:09:11Z, build source=binaryRelease, version=0.41.0, os=linux, arch=amd64, git version=2.40.1

git version 2.40.1

@mrvanes mrvanes added the bug Something isn't working label Apr 22, 2024
@mark2185
Copy link
Collaborator

I can't seem to reproduce it.

How often does it reproduce for you? And does it still happen if you do it on a new clone of that repo?

@mrvanes
Copy link
Author

mrvanes commented May 6, 2024

I can't reproduce, let's close the issue.

@mrvanes mrvanes closed this as completed May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants