jesseduffield / jesseduffield/lazygit

Segfault

Open
#4,572 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
82.4k
Forks
3k
Avg merge
2d 18h
Merged PRs (30d)
19

Description

**Describe the bug**
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0xf0 pc=0x105412f24]

goroutine 1 [running]:
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).postRefreshUpdate(0x14000276008, {0x1058a7678, 0x14000243730})
github.com/jesseduffield/lazygit/pkg/gui/view_helpers.go:156 +0x1e4
github.com/jesseduffield/lazygit/pkg/gui.(*guiCommon).PostRefreshUpdate(0x1400009a810?, {0x1058a7678?, 0x14000243730?})
github.com/jesseduffield/lazygit/pkg/gui/gui_common.go:34 +0x28
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).refreshView(0x14000211980, {0x1058a7678, 0x14000243730})
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers/refresh_helper.go:752 +0x4c
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers.(*RefreshHelper).refreshFilesAndSubmodules.func2()
github.com/jesseduffield/lazygit/pkg/gui/controllers/helpers/refresh_helper.go:532 +0x48
github.com/jesseduffield/lazygit/pkg/gui.(*guiCommon).OnUIThread.(*Gui).onUIThread.func1(0x14000e115e0?)
github.com/jesseduffield/lazygit/pkg/gui/gui.go:1125 +0x24
github.com/jesseduffield/gocui.(*Gui).processEvent(0x1400027a000)
github.com/jesseduffield/gocui@v0.3.1-0.20250421160159-82c9aaeba2b9/gui.go:805 +0xe0
github.com/jesseduffield/gocui.(*Gui).MainLoop(0x1400027a000)
github.com/jesseduffield/gocui@v0.3.1-0.20250421160159-82c9aaeba2b9/gui.go:778 +0x108
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0x14000276008, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:867 +0x434
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1()
github.com/jesseduffield/lazygit/pkg/gui/gui.go:873 +0x48
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0x1400005f928?)
github.com/jesseduffield/lazygit/pkg/utils/utils.go:90 +0x5c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0x14000276008, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:872 +0xc4
github.com/jesseduffield/lazygit/pkg/app.(*App).Run(...)
github.com/jesseduffield/lazygit/pkg/app/app.go:270
github.com/jesseduffield/lazygit/pkg/app.Run({0x10589ffb8?, 0x140000f6370?}, 0x14000210b40, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, ...}})
github.com/jesseduffield/lazygit/pkg/app/app.go:48 +0xb0
github.com/jesseduffield/lazygit/pkg/app.Start(0x1400005fef8, {0x0, 0x0})
github.com/jesseduffield/lazygit/pkg/app/entry_point.go:168 +0x9b0
main.main()
github.com/jesseduffield/lazygit/main.go:23 +0x98
```

**To Reproduce**
I have no way to reproduce this, also not sure what I was doing, I exited lazygit I believe.

**Version info:**
```
❯ lazygit --version
commit=, build date=, build source=Homebrew, version=0.50.0, os=darwin, arch=arm64, git version=2.49.0
```

```
❯ git --version
git version 2.49.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.