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

Possible crashing bug #74

Open
kurin opened this issue May 1, 2020 · 2 comments
Open

Possible crashing bug #74

kurin opened this issue May 1, 2020 · 2 comments
Labels

Comments

@kurin
Copy link
Owner

kurin commented May 1, 2020

Saw this in test output:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x6e8aa8]
goroutine 161 [running]:
bytes.(*Buffer).Len(...)
	/home/travis/.gimme/versions/go/src/bytes/buffer.go:73
github.com/kurin/blazer/b2.(*memoryBuffer).Len(0xc0005426f0, 0x0)
	/home/travis/gopath/src/github.com/kurin/blazer/b2/buffer.go:122 +0x8
github.com/kurin/blazer/b2.(*Writer).Write(0xc000130160, 0xc00009e060, 0x14, 0x14, 0x14, 0x0, 0x0)
	/home/travis/gopath/src/github.com/kurin/blazer/b2/writer.go:257 +0x7e
github.com/kurin/blazer/b2.onlyWriter.Write(...)
	/home/travis/gopath/src/github.com/kurin/blazer/b2/reader.go:302
io.copyBuffer(0x8545e0, 0xc000032010, 0x853c80, 0xc00000e580, 0xc00009e060, 0x14, 0x14, 0xc00008e300, 0xc000041f00, 0x1)
	/home/travis/.gimme/versions/go/src/io/io.go:411 +0x1fb
io.Copy(...)
	/home/travis/.gimme/versions/go/src/io/io.go:368
github.com/kurin/blazer/b2.copyContext.func1(0xc000094440, 0x853c80, 0xc00000e580, 0xc00001c2e0, 0xc000094450, 0xc0000291a0)
	/home/travis/gopath/src/github.com/kurin/blazer/b2/reader.go:312 +0xcc
created by github.com/kurin/blazer/b2.copyContext
	/home/travis/gopath/src/github.com/kurin/blazer/b2/reader.go:308 +0x119
FAIL	github.com/kurin/blazer/b2	0.059s
@kurin kurin added the bug label May 1, 2020
@kurin
Copy link
Owner Author

kurin commented May 1, 2020

Probably a use-after-close?

@httpjamesm
Copy link

httpjamesm commented Jan 26, 2023

I'm also experiencing this bug when using io.ReadAll. Any solution?

Update: turns out I just forgot to create my B2 client... ha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants