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

PANIC: runtime error: invalid memory address or nil pointer dereference #1

Open
kevinbowrin opened this issue Mar 5, 2014 · 1 comment

Comments

@kevinbowrin
Copy link

Not sure if you're using this as the main bug reporting tool, but I got this when looking at the 'next block' on the most-recent block:

  /usr/local/go/src/pkg/runtime/panic.c:482 (0x42005d)
    panicstring: runtime·panic(err);
/usr/local/go/src/pkg/runtime/os_linux.c:234 (0x41eefa)
    sigpanic: runtime·panicstring("invalid memory address or nil pointer dereference");
/home/thomas/go3/src/btcplex/models.go:162 (0x4ed900)
/home/thomas/go3/src/btcplex-server/btcplex-server.go:335 (0x4064f2)
/usr/local/go/src/pkg/runtime/asm_amd64.s:339 (0x430252)
    call32: CALLFN(call32, 32)
/usr/local/go/src/pkg/reflect/value.go:474 (0x500f9b)
    Value.call: call(fn, ptr, uint32(size))
/usr/local/go/src/pkg/reflect/value.go:345 (0x50008d)
    Value.Call: return v.call("Call", in)
/home/thomas/go3/src/github.com/codegangsta/inject/inject.go:102 (0x5b0634)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/thomas/go3/src/github.com/codegangsta/martini/env.go:1 (0x4c9e9c)
    (*context).Invoke: package martini
/home/thomas/go3/src/github.com/codegangsta/martini/router.go:286 (0x4c7c24)
    (*routeContext).run: vals, err := r.Invoke(handler)
/home/thomas/go3/src/github.com/codegangsta/martini/router.go:185 (0x4c7214)
    (*route).Handle: context.run()
/home/thomas/go3/src/github.com/codegangsta/martini/router.go:89 (0x4c668e)
    (*router).Handle: route.Handle(context, res)
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:107 (0x4c8450)
    Router.Handle.fm: m.Action(r.Handle)
/usr/local/go/src/pkg/runtime/asm_amd64.s:340 (0x4302b2)
    call64: CALLFN(call64, 64)
/usr/local/go/src/pkg/reflect/value.go:474 (0x500f9b)
    Value.call: call(fn, ptr, uint32(size))
/usr/local/go/src/pkg/reflect/value.go:345 (0x50008d)
    Value.Call: return v.call("Call", in)
/home/thomas/go3/src/github.com/codegangsta/inject/inject.go:102 (0x5b0634)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:161 (0x4c4e02)
    (*context).run: _, err := c.Invoke(c.handler())
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:152 (0x4c4d5b)
    (*context).Next: c.run()
/home/thomas/go3/src/github.com/codegangsta/martini/recovery.go:140 (0x4c8976)
    func.004: c.Next()
/usr/local/go/src/pkg/runtime/asm_amd64.s:339 (0x430252)
    call32: CALLFN(call32, 32)
/usr/local/go/src/pkg/reflect/value.go:474 (0x500f9b)
    Value.call: call(fn, ptr, uint32(size))
/usr/local/go/src/pkg/reflect/value.go:345 (0x50008d)
    Value.Call: return v.call("Call", in)
/home/thomas/go3/src/github.com/codegangsta/inject/inject.go:102 (0x5b0634)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:161 (0x4c4e02)
    (*context).run: _, err := c.Invoke(c.handler())
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:152 (0x4c4d5b)
    (*context).Next: c.run()
/home/thomas/go3/src/github.com/codegangsta/martini/logger.go:16 (0x4c8218)
    func.001: c.Next()
/usr/local/go/src/pkg/runtime/asm_amd64.s:340 (0x4302b2)
    call64: CALLFN(call64, 64)
/usr/local/go/src/pkg/reflect/value.go:474 (0x500f9b)
    Value.call: call(fn, ptr, uint32(size))
/usr/local/go/src/pkg/reflect/value.go:345 (0x50008d)
    Value.Call: return v.call("Call", in)
/home/thomas/go3/src/github.com/codegangsta/inject/inject.go:102 (0x5b0634)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:161 (0x4c4e02)
    (*context).run: _, err := c.Invoke(c.handler())
/home/thomas/go3/src/github.com/codegangsta/martini/martini.go:69 (0x4c4283)
    (*Martini).ServeHTTP: m.createContext(res, req).run()
/usr/local/go/src/pkg/net/http/server.go:1597 (0x489e9e)
    serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/pkg/net/http/server.go:1167 (0x487ea7)
    (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/pkg/runtime/proc.c:1394 (0x423ab0)
    goexit: runtime·goexit(void)    
@tsileo
Copy link
Owner

tsileo commented Mar 5, 2014

Thanks for the report, and yes, GitHub is the main bug reporting tool.

It happens because the next field of the most recent block (which will become the second to last) is updated few seconds before the new processed block become available.

I'll fix this soon, thanks!

Thanks!

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

2 participants