Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime error: invalid memory address or nil pointer dereference #5

Closed
Lz1y opened this issue Apr 30, 2019 · 5 comments
Closed

runtime error: invalid memory address or nil pointer dereference #5

Lz1y opened this issue Apr 30, 2019 · 5 comments

Comments

@Lz1y
Copy link

Lz1y commented Apr 30, 2019

System: Macos mojave
Error:

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

goroutine 1 [running]:
gopkg.in/cheggaaa/pb%2ev1.(*ProgressBar).Finish(0x0)
	/Users/ziyiliu/Documents/Golang/src/gopkg.in/cheggaaa/pb.v1/pb.go:227 +0x3b
main.parseErr(0x13427a0, 0xc00009c500)
	/Users/ziyiliu/Documents/Golang/src/github.com/egebalci/amber/common.go:143 +0xe3
main.banner()
	/Users/ziyiliu/Documents/Golang/src/github.com/egebalci/amber/common.go:208 +0x9d
main.main()
	/Users/ziyiliu/Documents/Golang/src/github.com/egebalci/amber/amber.go:35 +0x483
@Lz1y
Copy link
Author

Lz1y commented Apr 30, 2019

func banner() {

	if runtime.GOOS == "windows" {
		print(BasicBanner, "R")
	} else {
		powerlineFonts, err := exec.Command("fc-list").Output()
		parseErr(err)
		if strings.Contains(string(powerlineFonts), "Powerline") {
			print(BANNER, "R")
		} else {
			print(BasicBanner, "R")
		}
	}
	//BoldRed.Print(BANNER)

	BoldBlue.Print("# Version: ")
	BoldGreen.Println(VERSION)
	BoldBlue.Print("# Author: ")
	BoldGreen.Println("Ege Balcı")
	BoldBlue.Print("# Source: ")
	BoldGreen.Println("github.com/egebalci/amber")
}

macos haven't this command fc-list...

@EgeBalci
Copy link
Owner

EgeBalci commented May 5, 2019

It'll be fixed in the next release thanks for pointing out.

@joker8989
Copy link

I havenot tested it yet but i will according to the member above's error
when the "next release" will be available?

@EgeBalci
Copy link
Owner

EgeBalci commented May 6, 2019

In couple of months i hope :)

@Lz1y
Copy link
Author

Lz1y commented May 6, 2019

Got it!BTW, Awesome project!

@EgeBalci EgeBalci closed this as completed Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants