jesseduffield / lazygit

simple terminal UI for git commands
MIT License
50.95k stars 1.79k forks source link

Lazygit panicked on commit command #2144

Open grimerssy opened 2 years ago

grimerssy commented 2 years ago

I tried to commit changes after staging renamed files and got runtime error instead.

panic message:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102860120]

goroutine 1 [running]:
github.com/jesseduffield/lazygit/pkg/gui.(*statusManager).getStatusString(0x14000214000?)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/gui/app_status_manager.go:78 +0x30
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).layout(0x14000214000, 0x1400021a000)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/gui/layout.go:24 +0xe0
github.com/jesseduffield/gocui.ManagerFunc.Layout(0x0?, 0x0?)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/vendor/github.com/jesseduffield/gocui/gui.go:610 +0x2c
github.com/jesseduffield/gocui.(*Gui).flush(0x1400021a000)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/vendor/github.com/jesseduffield/gocui/gui.go:1036 +0x13c
github.com/jesseduffield/gocui.(*Gui).MainLoop(0x1400021a000)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/vendor/github.com/jesseduffield/gocui/gui.go:668 +0x1fc
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0x14000214000, {{0x0?, 0x0?}, {0x0?, 0x88?}})
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/gui/gui.go:619 +0x61c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1()
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/gui/gui.go:625 +0x38
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0x0?)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/utils/utils.go:115 +0x64
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0x14000214000, {{0x0?, 0x140001c59a0?}, {0x0?, 0x140000a7b78?}})
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/gui/gui.go:624 +0xc4
github.com/jesseduffield/lazygit/pkg/app.(*App).Run(...)
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/app/app.go:217
github.com/jesseduffield/lazygit/pkg/app.Run({0x102b4d3d8?, 0x140001e06e0?}, 0x140001c59a0, {{0x0?, 0x0?}, {0x0?, 0x0?}})
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/pkg/app/app.go:45 +0x6c
main.main()
        /private/tmp/lazygit-20220805-50417-1h5rcf6/lazygit-0.35/main.go:154 +0xd40
mark2185 commented 2 years ago

Please fill out the bug report template that's provided when you open up a new issue.

Is it easily reproducible?

grimerssy commented 2 years ago

Please fill out the bug report template that's provided when you open up a new issue.

Is it easily reproducible?

I tried to reproduce it to give you more context, but could not get it to panic after that