Skip to content

[Bug]: panic: runtime error: index out of range [310] with length 7 #45

@vasgard-bronsen

Description

@vasgard-bronsen

System

linux

Architecture

arm64

OS version

Rocky8

Installation method

  • Binary
  • Source code
  • Docker container

Description

lazyjournal -version reports "0.8.5"; it runs in a docker container. The container's OS is Rocky Linux 8, the host is MacOS.

After starting lazyjournal -mouse-disable I was watching the logs of a systemd unit. In the field "Filter (Default)" I had entered a string which was highlighted in "Logs" below.

While scrolling up and down through the filtered logs with the mouse, the program suddenly closed and I saw the following message in the terminal

configuration file not found
panic: runtime error: index out of range [310] with length 7

goroutine 1 [running]:
main.(*App).updateLogsView(0x40001afb88, 0x0)
        /home/runner/work/lazyjournal/lazyjournal/main.go:6860 +0x59c
main.(*App).scrollDownLogs(0x40001afb88, 0x1)
        /home/runner/work/lazyjournal/lazyjournal/main.go:6977 +0x12c
main.(*App).setupKeybindings.func57(0x3?, 0x4?)
        /home/runner/work/lazyjournal/lazyjournal/main.go:7870 +0x24
github.com/awesome-gocui/gocui.(*Gui).execKeybinding(0x4?, 0x4000f15088?, 0x4000680000?)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:947 +0x6c
github.com/awesome-gocui/gocui.(*Gui).execKeybindings(0x40001d6000, 0x40000b8a80, 0x40001b98f0)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:926 +0x14c
github.com/awesome-gocui/gocui.(*Gui).onKey(0x40001d6000, 0x40001b98f0)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:882 +0x54
github.com/awesome-gocui/gocui.(*Gui).handleEvent(0x40001b9988?, 0x40001b98e8?)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:554 +0x38
github.com/awesome-gocui/gocui.(*Gui).consumeevents(0x40001d6000)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:536 +0xd4
github.com/awesome-gocui/gocui.(*Gui).MainLoop(0x40001d6000)
        /home/runner/go/pkg/mod/github.com/awesome-gocui/gocui@v1.1.0/gui.go:515 +0x194
main.runGoCui(0x0)
        /home/runner/work/lazyjournal/lazyjournal/main.go:1611 +0x39e0
main.main()
        /home/runner/work/lazyjournal/lazyjournal/main.go:1617 +0x20

I was scrolling up and down repeatedly, looking for something.

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