-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
A clear and concise description of what the bug is.
When commiting the code with lazy git it panicked after choosing the name of the commit message and exited.
To Reproduce
Steps to reproduce the behavior:
- Open lazy git
- stage file
- commit file
- panic
Expected behavior
Code to be committed to git
Screenshots
If applicable, add screenshots to help explain your problem.
Version info:
Run lazygit --version and paste the result here
commit=, build date=, build source=homebrew, version=0.44.1, os=darwin, arch=arm64, git version=2.47.1
Run git --version and paste the result here
git version 2.47.1
Additional context
Lazy git has been working fine for me, I left the application open for a few hours and it then broke.
Note: please try updating to the latest version or manually building the latest master to see if the issue still occurs.
Log output:
lg
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104c07554]
goroutine 1 [running]:
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles.func1(...)
github.com/jesseduffield/lazygit/pkg/gui/controllers/files_controller.go:724
github.com/samber/lo.NoneBy[...](...)
github.com/samber/[email protected]/intersect.go:85
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles(0x140009d1e48?, {0x140000720d0?, 0x1400004c400?, 0x1057f8108?})
github.com/jesseduffield/lazygit/pkg/gui/controllers/files_controller.go:724 +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(0x140000720c8?, 0x1?)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:44 +0x38
github.com/samber/lo.Filter[...]({0x140002ba788, 0x48, 0x104cd1a1b}, 0x105054ec8?)
github.com/samber/[email protected]/slice.go:15 +0x94
github.com/jesseduffield/lazygit/pkg/gui.(*OptionsMapMgr).renderContextOptionsMap(0x140009d3390)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:43 +0x224
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).renderContextOptionsMap(0x1400068e440?)
github.com/jesseduffield/lazygit/pkg/gui/options_map.go:27 +0x4c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).layout(0x140001f2308, 0x140001288c0)
github.com/jesseduffield/lazygit/pkg/gui/layout.go:189 +0x610
github.com/jesseduffield/gocui.ManagerFunc.Layout(0x0?, 0x1048df5e8?)
github.com/jesseduffield/[email protected]/gui.go:726 +0x28
github.com/jesseduffield/gocui.(*Gui).flush(0x140001288c0)
github.com/jesseduffield/[email protected]/gui.go:1179 +0xb0
github.com/jesseduffield/gocui.(*Gui).processEvent(0x140001288c0)
github.com/jesseduffield/[email protected]/gui.go:810 +0x208
github.com/jesseduffield/gocui.(*Gui).MainLoop(0x140001288c0)
github.com/jesseduffield/[email protected]/gui.go:775 +0xf0
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0x140001f2308, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:846 +0x424
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1()
github.com/jesseduffield/lazygit/pkg/gui/gui.go:852 +0x40
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0x14000139240?)
github.com/jesseduffield/lazygit/pkg/utils/utils.go:99 +0x5c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0x140001f2308, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/gui/gui.go:851 +0xac
github.com/jesseduffield/lazygit/pkg/app.(*App).Run(...)
github.com/jesseduffield/lazygit/pkg/app/app.go:270
github.com/jesseduffield/lazygit/pkg/app.Run({0x105069f38?, 0x140001504d0?}, 0x140003122c0, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
github.com/jesseduffield/lazygit/pkg/app/app.go:48 +0x9c
github.com/jesseduffield/lazygit/pkg/app.Start(0x14000045ef8, {0x0, 0x0})
github.com/jesseduffield/lazygit/pkg/app/entry_point.go:167 +0x98c
main.main()
github.com/jesseduffield/lazygit/main.go:23 +0x98