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

访问http://localhost:8080就抛异常 #38

Open
machicao2013 opened this issue Oct 18, 2015 · 2 comments
Open

访问http://localhost:8080就抛异常 #38

machicao2013 opened this issue Oct 18, 2015 · 2 comments

Comments

@machicao2013
Copy link

2015/10/18 10:44:34 [router.go:879] [C] the request url is /
2015/10/18 10:44:34 [router.go:880] [C] Handler crashed with error runtime error: invalid memory address or nil pointer dereference
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/asm_amd64.s:401
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/panic.go:387
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/panic.go:42
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/sigpanic_unix.go:26
2015/10/18 10:44:34 [router.go:886] [C] /home/maxingsong/reposity/recipes/beego/src/github.com/astaxie/beego/controller.go:575
2015/10/18 10:44:34 [router.go:886] [C] /home/maxingsong/reposity/recipes/beego/src/github.com/beego/admin/src/rbac/public.go:30
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/asm_amd64.s:401
2015/10/18 10:44:34 [router.go:886] [C] /opt/development/go/src/reflect/value.go:419
2015/10/18 10:44:34 [router.go:886] [C] /opt/development/go/src/reflect/value.go:296
2015/10/18 10:44:34 [router.go:886] [C] /home/maxingsong/reposity/recipes/beego/src/github.com/astaxie/beego/router.go:803
2015/10/18 10:44:34 [router.go:886] [C] /opt/development/go/src/net/http/server.go:1703
2015/10/18 10:44:34 [router.go:886] [C] /opt/development/go/src/net/http/server.go:1204
2015/10/18 10:44:34 [router.go:886] [C] /usr/local/go/src/runtime/asm_amd64.s:2232
不知道是什么原因

@machicao2013
Copy link
Author

./hello -syncdb 这一步执行成功了

@basung
Copy link

basung commented Dec 8, 2015

./hello -syncdb 这一步执行报错:
wangyaneMacBook% ./hello -syncdb
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x415090b]

goroutine 1 [running]:
github.com/astaxie/beego.(_beegoAppConfig).String(0x0, 0x4839610, 0x10, 0x0, 0x0)
/Users/wangyang/golang/src/github.com/astaxie/beego/config.go:110 +0x15b
github.com/beego/admin/src/models.(_Group).TableName(0xc820015180, 0x0, 0x0)
/Users/wangyang/golang/src/github.com/beego/admin/src/models/GroupModel.go:23 +0x44
reflect.Value.call(0x46ca6c0, 0xc820015180, 0x113, 0x47bfa90, 0x4, 0xc82015fb08, 0x0, 0x0, 0x0, 0x0, ...)
/usr/local/go/src/reflect/value.go:432 +0x120a
reflect.Value.Call(0x46ca6c0, 0xc820015180, 0x113, 0xc82015fb08, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/go/src/reflect/value.go:300 +0xb1
github.com/astaxie/beego/orm.getTableName(0x46ca6c0, 0xc820015180, 0x16, 0x0, 0x0)
/Users/wangyang/golang/src/github.com/astaxie/beego/orm/models_utils.go:35 +0x15a
github.com/astaxie/beego/orm.registerModel(0x0, 0x0, 0x46ca6c0, 0xc820015180)
/Users/wangyang/golang/src/github.com/astaxie/beego/orm/models_boot.go:36 +0x29b
github.com/astaxie/beego/orm.RegisterModelWithPrefix(0x0, 0x0, 0xc82015fed0, 0x1, 0x1)
/Users/wangyang/golang/src/github.com/astaxie/beego/orm/models_boot.go:313 +0x12e
github.com/astaxie/beego/orm.RegisterModel(0xc82015fed0, 0x1, 0x1)
/Users/wangyang/golang/src/github.com/astaxie/beego/orm/models_boot.go:303 +0x41
github.com/beego/admin/src/models.init.1()
/Users/wangyang/golang/src/github.com/beego/admin/src/models/GroupModel.go:27 +0x98
github.com/beego/admin/src/models.init()
/Users/wangyang/golang/src/github.com/beego/admin/src/models/UserModel.go:136 +0x77
github.com/beego/admin/src.init()
/Users/wangyang/golang/src/github.com/beego/admin/src/rbac.go:158 +0x59
github.com/beego/admin/src/rbac.init()
/Users/wangyang/golang/src/github.com/beego/admin/src/rbac/user.go:86 +0x40
github.com/beego/admin.init()
/Users/wangyang/golang/src/github.com/beego/admin/admin.go:41 +0x40
hello/routers.init()
/Users/wangyang/golang/src/hello/routers/router.go:12 +0x40
main.init()
/Users/wangyang/golang/src/hello/main.go:10 +0x3b

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:1696 +0x1

goroutine 5 [syscall]:
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
/usr/local/go/src/os/signal/signal_unix.go:28 +0x37
wangyaneMacBook%

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