Skip to content

SIGSEGV on pgup/dn press #16

Description

@scotts-chrysalis

Describe the bug
Crashes when pressing PgUp or PgDn

To Reproduce
Steps to reproduce the behavior:

  1. Press 3 to focus Dependencies
  2. Press PgDn or PgUp

Expected behavior
Appropriate scroll of list

Actual Result
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xdc pc=0x14c1d50]

goroutine 1 [running]:
github.com/jesseduffield/lazynpm/pkg/gui.(*Gui).scrollDownView(0xc000225ae0, 0xc0001be120, 0x5c, 0x1a37801, 0xc0001bd020)
/home/runner/work/lazynpm/lazynpm/pkg/gui/global_handlers.go:41 +0x50
github.com/jesseduffield/lazynpm/pkg/gui.(*Gui).scrollDownMain(0xc000225ae0, 0xc000314000, 0xc00000a960, 0x11c6126, 0x16ce440)
/home/runner/work/lazynpm/lazynpm/pkg/gui/global_handlers.go:84 +0x53
github.com/jesseduffield/gocui.(*Gui).execKeybinding(0xc000314000, 0xc00000a960, 0xc00007a1e0, 0x2, 0xc0005e3b74, 0x2)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:936 +0x93
github.com/jesseduffield/gocui.(*Gui).execKeybindings(0xc000314000, 0xc00000a960, 0xc0005e3bd0, 0x0, 0xc0001bd008, 0xc0005e3b74)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:928 +0x1fa
github.com/jesseduffield/gocui.(*Gui).onKey(0xc000314000, 0xc0005e3bd0, 0x2, 0x0)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:833 +0x296
github.com/jesseduffield/gocui.(*Gui).handleEvent(...)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:514
github.com/jesseduffield/gocui.(*Gui).MainLoop(0xc000314000, 0xc000000003, 0xc00018fd30)
/home/runner/work/lazynpm/lazynpm/vendor/github.com/jesseduffield/gocui/gui.go:474 +0x1f2
github.com/jesseduffield/lazynpm/pkg/gui.(*Gui).Run(0xc000225ae0, 0x0, 0x0)
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:236 +0x853
github.com/jesseduffield/lazynpm/pkg/gui.(*Gui).RunWithSubprocesses(0xc000225ae0, 0xc0000b6d00, 0xc0000b3ec0)
/home/runner/work/lazynpm/lazynpm/pkg/gui/gui.go:280 +0x2f
github.com/jesseduffield/lazynpm/pkg/app.(*App).Run(...)
/home/runner/work/lazynpm/lazynpm/pkg/app/app.go:120
main.main()
/home/runner/work/lazynpm/lazynpm/main.go:63 +0x6e4

Desktop (please complete the following information):

  • OS: MacOS 14.5
  • Lazynpm Version v0.1.4

Additional context
I've tried on a handful of repos. Does seem to matter if list is too short to scroll, or plenty long and needs to scroll. I've also quickly tested while the other left hand lists are focused. It seems to crash on pgup/pgdn in all situations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions