Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

segmentation violation after committing deleted files, unable to reproduce so far #3646

Open
Chris44442 opened this issue Jun 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Chris44442
Copy link

Chris44442 commented Jun 8, 2024

Describe the bug
Hi, after committing a few deleted files in my repo I got a segmentation violation. I am not quite sure why this happened as I have committed deleted files before and it was working fine. The TUI crashed, but the commit was successful.

To Reproduce
Unable to reproduce so far.

Expected behavior
No segmentation violation

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

goroutine 1 [running]:
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles.func1(...)
/home/runner/work/lazygit/lazygit/pkg/gui/controllers/files_controller.go:713
github.com/samber/lo.NoneBy...
/home/runner/work/lazygit/lazygit/vendor/github.com/samber/lo/intersect.go:85
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).canEditFiles(0x0?, {0xc0009ca068?, 0xaf0745?, 0xc000241940?})
/home/runner/work/lazygit/lazygit/pkg/gui/controllers/files_controller.go:713 +0x29
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).GetKeybindings.(*ListControllerTrait[...]).itemsSelected.func5()
/home/runner/work/lazygit/lazygit/pkg/gui/controllers/list_controller_trait.go:98 +0xe3
github.com/jesseduffield/lazygit/pkg/gui/controllers.(*FilesController).GetKeybindings.(*ListControllerTrait[...]).require.func6()
/home/runner/work/lazygit/lazygit/pkg/gui/controllers/list_controller_trait.go:38 +0x47
github.com/jesseduffield/lazygit/pkg/gui/types.(*Binding).IsDisabled(...)
/home/runner/work/lazygit/lazygit/pkg/gui/types/keybindings.go:47
github.com/jesseduffield/lazygit/pkg/gui.(*OptionsMapMgr).renderContextOptionsMap.func1(0xc0009ca060?, 0x1?)
/home/runner/work/lazygit/lazygit/pkg/gui/options_map.go:44 +0x27
github.com/samber/lo.Filter[...]({0xc0009d6288, 0x46, 0xc0009ea000}, 0xd78228?)
/home/runner/work/lazygit/lazygit/vendor/github.com/samber/lo/slice.go:15 +0x9e
github.com/jesseduffield/lazygit/pkg/gui.(*OptionsMapMgr).renderContextOptionsMap(0xc000325390)
/home/runner/work/lazygit/lazygit/pkg/gui/options_map.go:43 +0x245
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).renderContextOptionsMap(0xc000076858?)
/home/runner/work/lazygit/lazygit/pkg/gui/options_map.go:27 +0x4e
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).layout(0xc000226608, 0xc00020a8c0)
/home/runner/work/lazygit/lazygit/pkg/gui/layout.go:168 +0x778
github.com/jesseduffield/gocui.ManagerFunc.Layout(0x0?, 0xc000325518?)
/home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:707 +0x19
github.com/jesseduffield/gocui.(*Gui).flush(0xc00020a8c0)
/home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:1153 +0xab
github.com/jesseduffield/gocui.(*Gui).processEvent(0xc00020a8c0)
/home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:784 +0x2d9
github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc00020a8c0)
/home/runner/work/lazygit/lazygit/vendor/github.com/jesseduffield/gocui/gui.go:749 +0x9d
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).Run(0xc000226608, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:707 +0x6fa
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError.func1()
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:713 +0x45
github.com/jesseduffield/lazygit/pkg/utils.SafeWithError(0x2a?)
/home/runner/work/lazygit/lazygit/pkg/utils/utils.go:99 +0x5c
github.com/jesseduffield/lazygit/pkg/gui.(*Gui).RunAndHandleError(0xc000226608, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
/home/runner/work/lazygit/lazygit/pkg/gui/gui.go:712 +0xce
github.com/jesseduffield/lazygit/pkg/app.(*App).Run(...)
/home/runner/work/lazygit/lazygit/pkg/app/app.go:266
github.com/jesseduffield/lazygit/pkg/app.Run({0xe5b5f0?, 0xc0002a28c0?}, 0xc000241180, {{0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}})
/home/runner/work/lazygit/lazygit/pkg/app/app.go:49 +0xd6
github.com/jesseduffield/lazygit/pkg/app.Start(0xc00013df00, {0x0, 0x0})
/home/runner/work/lazygit/lazygit/pkg/app/entry_point.go:150 +0xd05
main.main()
/home/runner/work/lazygit/lazygit/main.go:23 +0x98

Version info:
lazygit --version
commit=6fcb7eb8bb616c170506312870b3bf15f3dbe37c, build date=2024-05-19T10:15:28Z, build source=binaryRelease, version=0.42.0, os=linux, arch=amd64, git version=2.45.1

I am running Arch, Wayland, Alacritty and tmux if that makes any difference.

@Chris44442 Chris44442 added the bug Something isn't working label Jun 8, 2024
@stefanhaller
Copy link
Collaborator

Thanks for the report. As far as I can see, this is just one of the many possible manifestations of our general concurrency issues; see #2974 for some discussion.

I won't get around to working on this any time soon I'm afraid, so I'm hoping this is just a very rare crash. Do let us know if it happens again; in that case we might have to try and come up with some bandaid fix in the meantime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants