Skip to content

Panic when viewing my subscriptions #157

@insom

Description

@insom

Hi,

Using master as of b503471 I get a crash when trying to view my subscriptions with ^A:

panic: runtime error: index out of range [-1] [recovered]
	panic: runtime error: index out of range [-1]

goroutine 1 [running]:
gitlab.com/tslocum/cview.(*Application).Run.func1(0xc000089c20)
	/home/insom/go/pkg/mod/gitlab.com/tslocum/cview@v1.4.8-0.20200713214710-cc7796c4ca44/application.go:268 +0x81
panic(0xb211a0, 0xc0004f8440)
	/usr/lib/go-1.13/src/runtime/panic.go:679 +0x1b2
github.com/makeworld-the-better-one/amfora/subscriptions.GetPageEntries(0x0)
	/home/insom/Repo/amfora/subscriptions/entries.go:127 +0xdbc
github.com/makeworld-the-better-one/amfora/display.Subscriptions(0xc000323bd0, 0xb9396a, 0x13, 0xc000070d3c, 0xc000000180)
	/home/insom/Repo/amfora/display/subscriptions.go:74 +0x154
github.com/makeworld-the-better-one/amfora/display.Init.func3(0xc00031c2e0, 0xc000070d38)
	/home/insom/Repo/amfora/display/display.go:324 +0x6a1
gitlab.com/tslocum/cview.(*Application).Run(0xc000089c20, 0x0, 0x0)
	/home/insom/go/pkg/mod/gitlab.com/tslocum/cview@v1.4.8-0.20200713214710-cc7796c4ca44/application.go:342 +0x42a
main.main()
	/home/insom/Repo/amfora/amfora.go:63 +0x6a5

I can't see anything wrong with my subscriptions.json but have published it in case it helps with debugging.

[ Amfora's my favourite client, I love your work ❤️, sorry my first chance to say that is a bug report. ]

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