tigrawap/slit

Crash while paging from stdout

Closed this issue · 2 comments

I put slit as the default pager and for some unknown reason when git log needs to display the data it crashes with the following backtrace:

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

goroutine 29 [running]:
bufio.(*Reader).ReadSlice(0x0, 0xc4201f600a, 0x2, 0xc420078536, 0x2, 0x2, 0xc420078020)
	/usr/local/go/src/bufio/bufio.go:316 +0x26
bufio.(*Reader).ReadBytes(0x0, 0xc42007800a, 0x5a63c0, 0x401cee, 0xc42003ed30, 0xc42003ed40, 0xc420078001)
	/usr/local/go/src/bufio/bufio.go:416 +0x66
main.(*Fetcher).readline(0xc420092280, 0xc420078020, 0x5a63c0, 0xc420078020, 0x17ef01, 0x5a63c0, 0xc420078020)
	/Users/tigra/Development/go/src/github.com/tigrawap/slit/fetcher.go:134 +0x38
main.(*Fetcher).advanceLines(0xc420092280, 0xb805, 0x17d4b6, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/tigra/Development/go/src/github.com/tigrawap/slit/fetcher.go:309 +0x14b
main.(*viewer).updateLastLine(0xc4200cc000, 0x5a7300, 0xc42008e600)
	/Users/tigra/Development/go/src/github.com/tigrawap/slit/term.go:471 +0x195
main.(*viewer).termGui.func2(0xc4200cc000, 0x5a7300, 0xc42008e600, 0xc420078680)
	/Users/tigra/Development/go/src/github.com/tigrawap/slit/term.go:380 +0x3f
created by main.(*viewer).termGui
	/Users/tigra/Development/go/src/github.com/tigrawap/slit/term.go:380 +0x35c

I downloaded slit binary a few days ago, no idea what version it is exactly.

I tried the latest version now and the issue is gone. Never mind.

Yep, it was fixed. Also --version was added in that version exactly for this reason :)