Skip to content

PANIC: reflect: call of reflect.Value.Interface on zero Value #86

@emersion

Description

@emersion
[Macaron] PANIC: reflect: call of reflect.Value.Interface on zero Value
/usr/local/go/src/runtime/panic.go:426 (0x8070a0d)
    gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/usr/local/go/src/reflect/value.go:913 (0x81a05fa)
    valueInterface: panic(&ValueError{"reflect.Value.Interface", 0})
/usr/local/go/src/reflect/value.go:908 (0x81a0572)
    Value.Interface: return valueInterface(v, true)
/home/simon/go/src/github.com/go-macaron/binding/binding.go:333 (0x825ec6b)
    validateField: sliceValue := sliceVal.Interface()
/home/simon/go/src/github.com/go-macaron/binding/binding.go:320 (0x825e9fe)
    validateStruct: errors = validateField(errors, zero, field, fieldVal, fieldValue)
/home/simon/go/src/github.com/go-macaron/binding/binding.go:318 (0x825e95a)
    validateStruct: errors = validateStruct(errors, fieldValue)
/home/simon/go/src/github.com/go-macaron/binding/binding.go:236 (0x8264d23)
    Validate.func1: errors = validateStruct(errors, obj)
/usr/local/go/src/runtime/asm_386.s:488 (0x80973da)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:435 (0x819ecdb)
    Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:303 (0x819dcfc)
    Value.Call: return v.call("Call", in)
/home/simon/go/src/github.com/go-macaron/inject/inject.go:117 (0x81b7fd4)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/simon/go/src/github.com/go-macaron/binding/binding.go:633 (0x8263e61)
    validateAndMap: ctx.Invoke(Validate(obj.Interface()))
/home/simon/go/src/github.com/go-macaron/binding/binding.go:210 (0x82649ed)
    Json.func1: validateAndMap(jsonStruct, ctx, errors, ifacePtr...)
/usr/local/go/src/runtime/asm_386.s:488 (0x80973da)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:435 (0x819ecdb)
    Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:303 (0x819dcfc)
    Value.Call: return v.call("Call", in)
/home/simon/go/src/github.com/go-macaron/inject/inject.go:117 (0x81b7fd4)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/simon/go/src/gopkg.in/macaron.v1/context.go:113 (0x809bd54)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/simon/go/src/gopkg.in/macaron.v1/context.go:104 (0x809bc68)
    (*Context).Next: c.run()
/home/simon/go/src/gopkg.in/macaron.v1/recovery.go:161 (0x80ada5b)
    Recovery.func1: c.Next()
/usr/local/go/src/runtime/asm_386.s:488 (0x80973da)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:435 (0x819ecdb)
    Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:303 (0x819dcfc)
    Value.Call: return v.call("Call", in)
/home/simon/go/src/github.com/go-macaron/inject/inject.go:117 (0x81b7fd4)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/simon/go/src/gopkg.in/macaron.v1/context.go:113 (0x809bd54)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/simon/go/src/gopkg.in/macaron.v1/context.go:104 (0x809bc68)
    (*Context).Next: c.run()
/home/simon/go/src/gopkg.in/macaron.v1/logger.go:40 (0x80aca1e)
    Logger.func1: ctx.Next()
/usr/local/go/src/runtime/asm_386.s:488 (0x80973da)
    call16: CALLFN(·call16, 16)
/usr/local/go/src/reflect/value.go:435 (0x819ecdb)
    Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:303 (0x819dcfc)
    Value.Call: return v.call("Call", in)
/home/simon/go/src/github.com/go-macaron/inject/inject.go:117 (0x81b7fd4)
    (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil
/home/simon/go/src/gopkg.in/macaron.v1/context.go:113 (0x809bd54)
    (*Context).run: vals, err := c.Invoke(c.handler())
/home/simon/go/src/gopkg.in/macaron.v1/router.go:184 (0x80aef02)
    (*Router).Handle.func1: c.run()
/home/simon/go/src/gopkg.in/macaron.v1/router.go:286 (0x80a75bd)
    (*Router).ServeHTTP: h(rw, req, p)
/home/simon/go/src/gopkg.in/macaron.v1/macaron.go:177 (0x80a041f)
    (*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:2081 (0x816a256)
    serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1472 (0x81676a8)
    (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_386.s:1585 (0x8099211)
    goexit: BYTE    $0x90   // NOP

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions