Open
Description
Describe the bug
Lazygit crashed on a commit
To Reproduce
Cannot reproduce at the moment :(
Screenshots
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102c002d4]
goroutine 1 [running]:
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles.func1(...)
github.com/jesseduffield/lazygit/pkg/gui/controllers/files_controller.go:760
github.com/samber/lo.NoneBy[...](...)
github.com/samber/[email protected]/intersect.go:85
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles(0x140000cddb8?, {0x1400079a178?, 0x140001f0980?,
0x1038653c8?})
github.com/jesseduffield/lazygit/pkg/gui/controllers/files_controller.go:760 +0x34
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).GetKeybindings.(*ListControllerTrait[...]).itemsSelected.func5
()
github.com/jesseduffield/lazygit/pkg/gui/controllers/list_controller_trait.go:98 +0xec
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).GetKeybindings.(*ListControllerTrait[...]).require.func6()
github.com/jesseduffield/lazygit/pkg/gui/controllers/list_controller_trait.go:38 +0x58
github.com/jesseduffield/lazygit/pkg/gui/types.(*Binding).IsDisabled(...)
github.com/jesseduffield/lazygit/pkg/gui/types/keybindings.go:47
github.com/jesseduffield/lazygit/pkg/gui.(*OptionsMapMgr).renderContextOptionsMap.func1(0x1400079a170?, 0x1?)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:44 +0x38
github.com/samber/lo.Filter[...]({0x14000894588, 0x4a, 0x102ccba94}, 0x1030551d8?)
github.com/samber/[email protected]/slice.go:15 +0x94
github.com/jesseduffield/lazygit/pkg/gui.(*OptionsMapMgr).renderContextOptionsMap(0x140000cf340)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:43 +0x224
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).renderContextOptionsMap(0x140001ec568?)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:27 +0x4c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).layout(0x14000033808, 0x14000250000)
github.com/jesseduffield/lazygit/pkg/gui/layout.go:187 +0x60c
github.com/jesseduffield/gocui.ManagerFunc.Layout(0x0?, 0x140009a7520?)
github.com/jesseduffield/[email protected]/gui.go:726 +0x28
github.com/jesseduffield/gocui.(*Gui).flush(0x14000250000)
github.com/jesseduffield/[email protected]/gui.go:1179 +0xb0
github.com/jesseduffield/gocui.(*Gui).processEvent(0x14000250000)
github.com/jesseduffield/[email protected]/gui.go:810 +0x208
github.com/jesseduffield/gocui.(*Gui).MainLoop(0x14000250000)
github.com/jesseduffield/[email protected]/gui.go:775 +0xf0
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0x14000033808, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:855 +0x434
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1()
github.com/jesseduffield/lazygit/pkg/gui/gui.go:861 +0x48
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0x14a3935c8?)
github.com/jesseduffield/lazygit/pkg/utils/utils.go:99 +0x5c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0x14000033808, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:860 +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({0x10306a498?, 0x14000134580?}, 0x140001f0840, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, {0x0,
...}})
github.com/jesseduffield/lazygit/pkg/app/app.go:48 +0xb4
github.com/jesseduffield/lazygit/pkg/app.Start(0x14000049ef8, {0x0, 0x0})
github.com/jesseduffield/lazygit/pkg/app/entry_point.go:168 +0x9b4
main.main()
github.com/jesseduffield/lazygit/main.go:23 +0x98
Version info:
commit=, build date=, build source=homebrew, version=0.45.2, os=darwin, arch=arm64, git version=2.48.1
git version 2.48.1
Additional context
I'm running lazygit inside Neovim, using the default LazyVim config.