jesseduffield / lazygit

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

Got SIGSEGV while returning to lazygit from command prompt #1367

Open MuratUrsavas opened 3 years ago

MuratUrsavas commented 3 years ago

While I was returning lazygit after editing the commit message via editor (nano) in a submodule, it got crashed with SIGSEGV.

Here's the printed backtrace:

[dev-vport 887dc19] Fixed: Two synced Trippy Threads timers create problems. (vport-fw#27)
 1 file changed, 1 insertion(+), 1 deletion(-)

Press enter to return to lazygit
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x45c25c]

goroutine 1 [running]:
github.com/jesseduffield/gocui.(*View).draw(0xc0005f4b40, 0xc032a2, 0x10)
    github.com/jesseduffield/gocui@v0.3.1-0.20210410011117-a2bb4baca390/view.go:786 +0x4e8
github.com/jesseduffield/gocui.(*Gui).draw(0xc0000f5a00, 0xc0005f4b40, 0x100000007, 0x0)
    github.com/jesseduffield/gocui@v0.3.1-0.20210410011117-a2bb4baca390/gui.go:1042 +0xfc
github.com/jesseduffield/gocui.(*Gui).flush(0xc0000f5a00, 0x0, 0x0)
    github.com/jesseduffield/gocui@v0.3.1-0.20210410011117-a2bb4baca390/gui.go:727 +0x21d
github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc0000f5a00, 0xc000000004, 0xc00058b9e0)
    github.com/jesseduffield/gocui@v0.3.1-0.20210410011117-a2bb4baca390/gui.go:622 +0x234
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0xc0000f5860, 0x0, 0x0)
    github.com/jesseduffield/lazygit@/pkg/gui/gui.go:536 +0x51d
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1(0xc000205ac0, 0xc000205af8)
    github.com/jesseduffield/lazygit@/pkg/gui/gui.go:544 +0x41
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0xc000205b20, 0x0, 0x0)
    github.com/jesseduffield/lazygit@/pkg/utils/utils.go:380 +0x68
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0xc0000f5860, 0x0, 0xbff860)
    github.com/jesseduffield/lazygit@/pkg/gui/gui.go:543 +0x7d
github.com/jesseduffield/lazygit/pkg/app.(*App).Run(0xc0001e5650, 0xc000188630, 0x0)
    github.com/jesseduffield/lazygit@/pkg/app/app.go:242 +0x6b
main.main()
    github.com/jesseduffield/lazygit@/main.go:126 +0xb2d

Here's the version info:

commit=, build date=2021-04-11, build source=debian, version=0.27.4, os=linux, arch=amd64
mark2185 commented 1 year ago

Does this still occur on the latest version?