franela/goblin

Random panic on runtime.errorString conversion

kachayev opened this issue · 8 comments

From time to time go test -v command fails with

panic: runtime error: invalid memory address or nil pointer dereference [recovered]
    panic: interface conversion: interface is runtime.errorString, not string [recovered]
    panic: interface conversion: interface is runtime.errorString, not string
[signal 0xb code=0x1 addr=0x0 pc=0x3b924]

goroutine 4 [running]:
testing.func·004()
    /usr/local/Cellar/go/1.1/src/pkg/testing/testing.go:348 +0xcd
github.com/franela/goblin.func·001()
    ~/src/github.com/franela/goblin/goblin.go:156 +0x9d

Unfortunately, I can't find appropriate scenario to reproduce this situation, but it happens quite often.

Can you please provide further information about the system you're running Goblin in?.

Does this happens always with the same test or it just crashes randomly?

Thanks,

Marcos.

I'm not sure what information can help you:

$ go version
go version go1.1 darwin/amd64
$ uname -a
Darwin local 11.4.2 Darwin Kernel Version 11.4.2: Thu Aug 23 16:25:48 PDT 2012; root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64
$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GORACE=""
GOTOOLDIR="/usr/local/Cellar/go/1.1/pkg/tool/darwin_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread -fno-common"
CGO_ENABLED="1"
$ cat /src/github.com/franela/goblin/.git/HEAD
42acea7b160991b24bf413d8c43140dafca60fca

It crashes randomly.

Thx for the update.

One last question. Are you using Gomega assertions in your test?

We've identified the issue. Fix is on the way.

Are you using Gomega assertions in your test?

Nope.

Fix is on the way.

Great, thanks!

Fixed with pull request #26

Could you please update goblin to the last version and check if you are still getting the same error?

We'll wait for your feedback before closing this.

Ah, now it works fine. Thanks!

Awsome.

Closed!.