br0xen / boltbrowser

A CLI Browser for BoltDB Files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App crashes when multiple files are passed and one of them cannot be open

andrewslotin opened this issue · comments

I got this panic while working on #18

main.(*BoltDB).buildVisiblePathSlice(0x0, 0x0, 0xc4200e0000, 0x3, 0x80, 0x0)
	$GOPATH/src/github.com/br0xen/boltbrowser/bolt_model.go:130 +0x37
main.(*BoltDB).getNextVisiblePath(0x0, 0x0, 0x0, 0x0, 0xc42003dc50, 0x10e3a35, 0x11db480)
	$GOPATH/src/github.com/br0xen/boltbrowser/bolt_model.go:167 +0x2f
main.(*BrowserScreen).moveCursorDown(0xc4200e8000, 0xc42003dcd0)
	$GOPATH/src/github.com/br0xen/boltbrowser/screen_browser.go:474 +0x4d
main.(*BrowserScreen).handleBrowseKeyEvent(0xc4200e8000, 0xffec0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x2)
	$GOPATH/src/github.com/br0xen/boltbrowser/screen_browser.go:123 +0x9d
main.(*BrowserScreen).handleKeyEvent(0xc4200e8000, 0xffec0000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0)
	$GOPATH/src/github.com/br0xen/boltbrowser/screen_browser.go:78 +0x19c
main.mainLoop(0x0, 0x3000100080001, 0x30001)
	$GOPATH/src/github.com/br0xen/boltbrowser/mainloop.go:25 +0x299
main.main()
	$GOPATH/src/github.com/br0xen/boltbrowser/boltbrowser.go:56 +0x21b

To reproduce it you need to invoke boltbrowser with more than one file and make sure that one of them produces an error while being opened (use non-db file for example). Once you get to the screen for this file, press any arrow button.

This has been fixed for a while, the issue just needed to be closed.