vbauerster / mpb

multi progress bar for Go cli applications
The Unlicense
2.29k stars 123 forks source link

nil dereference crash on Bar.SetTotal #56

Closed nektro closed 4 years ago

nektro commented 4 years ago

I'm honestly not sure how it's crashing here..


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

goroutine 1 [running]:
github.com/vbauerster/mpb.(*Bar).SetTotal(0x0, 0x19cb8, 0x4aa600)
        /home/meghan/go/src/github.com/vbauerster/mpb/bar.go:214 +0x37```
vbauerster commented 4 years ago

Which version of mpb do you use? Can you please provide a snippet of code where I can reproduce this?

The only case which may lead to this behavior is when you're trying to reuse *mpb.Progress instance after it's done.

nektro commented 4 years ago

oh i think i might have an idea why i might be getting this crash then