{"action":"created","issue":{"url":"https://api.github.com/repos/gogits/gogs/issues/1830","labels_url":"https://api.github.com/repos/gogits/gogs/issues/1830/labels{/name}","comments_url":"https://api.github.com/repos/gogits/gogs/issues/1830/comments","events_url":"https://api.github.com/repos/gogits/gogs/issues/1830/events","html_url":"https://github.com/gogits/gogs/issues/1830","id":113007785,"number":1830,"title":"error 500 when reopening issue","user":{"login":"soul9","id":175965,"avatar_url":"https://avatars.githubusercontent.com/u/175965?v=3","gravatar_id":"","url":"https://api.github.com/users/soul9","html_url":"https://github.com/soul9","followers_url":"https://api.github.com/users/soul9/followers","following_url":"https://api.github.com/users/soul9/following{/other_user}","gists_url":"https://api.github.com/users/soul9/gists{/gist_id}","starred_url":"https://api.github.com/users/soul9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soul9/subscriptions","organizations_url":"https://api.github.com/users/soul9/orgs","repos_url":"https://api.github.com/users/soul9/repos","events_url":"https://api.github.com/users/soul9/events{/privacy}","received_events_url":"https://api.github.com/users/soul9/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/gogits/gogs/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/gogits/gogs/labels/feedback%20needed","name":"feedback needed","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/gogits/gogs/milestones/9","html_url":"https://github.com/gogits/gogs/milestones/0.7.0","labels_url":"https://api.github.com/repos/gogits/gogs/milestones/9/labels","id":1226114,"number":9,"title":"0.7.0","description":"","creator":{"login":"Unknwon","id":2946214,"avatar_url":"https://avatars.githubusercontent.com/u/2946214?v=3","gravatar_id":"","url":"https://api.github.com/users/Unknwon","html_url":"https://github.com/Unknwon","followers_url":"https://api.github.com/users/Unknwon/followers","following_url":"https://api.github.com/users/Unknwon/following{/other_user}","gists_url":"https://api.github.com/users/Unknwon/gists{/gist_id}","starred_url":"https://api.github.com/users/Unknwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unknwon/subscriptions","organizations_url":"https://api.github.com/users/Unknwon/orgs","repos_url":"https://api.github.com/users/Unknwon/repos","events_url":"https://api.github.com/users/Unknwon/events{/privacy}","received_events_url":"https://api.github.com/users/Unknwon/received_events","type":"User","site_admin":false},"open_issues":107,"closed_issues":130,"state":"open","created_at":"2015-07-26T11:28:23Z","updated_at":"2015-10-23T15:08:01Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-10-23T12:11:58Z","updated_at":"2015-10-23T16:16:45Z","closed_at":null,"body":"I have tried on both latest stable tag and develop branch, and I can not reopen an issue. There seems to be an invalid pointer dereference somewhere, but I haven't really been able to pinpoint where.\r\nIf I comment and reopen, the comment is posted and displayed properly but the issue is not reopened.\r\nI should add that I have been using develop branch, and then downgraded to stable tag a while ago. Updating again to develop branch does not help.\r\n\r\n<pre>\r\nOct 23 12:01:56 gogs gogs[3980]: [Macaron] Started POST /WTsys/OpenELEC/issues/6/comments for 10.0.251.88                                     [58/1893]\r\nOct 23 12:01:56 gogs gogs[3980]: 2015/10/23 12:01:56 [T] Comment created: 2/18/78\r\nOct 23 12:01:56 gogs gogs[3980]: [Macaron] PANIC: runtime error: invalid memory address or nil pointer dereference\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/panic.go:423 (0x4c2fc9)\r\nOct 23 12:01:56 gogs gogs[3980]: gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/panic.go:42 (0x4c1689)\r\nOct 23 12:01:56 gogs gogs[3980]: panicmem: panic(memoryError)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/sigpanic_unix.go:24 (0x4d803a)\r\nOct 23 12:01:56 gogs gogs[3980]: sigpanic: panicmem()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/gogits/gogs/routers/repo/issue.go:773 (0x8b6864)\r\nOct 23 12:01:56 gogs gogs[3980]: NewComment.func1: pr, err = models.GetUnmergedPullRequest(pull.HeadRepoID, pull.BaseRepoID, pull.HeadBranch, pull.Base\r\nBranch)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/gogits/gogs/routers/repo/issue.go:855 (0x88e39f)\r\nOct 23 12:01:56 gogs gogs[3980]: NewComment: }\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/asm_amd64.s:438 (0x4f416e)\r\nOct 23 12:01:56 gogs gogs[3980]: call64: CALLFN(·call64, 64)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:432 (0x8dddea)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:300 (0x8dcab1)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.Call: return v.call(\"Call\", in)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/go-macaron/inject/inject.go:117 (0xb78c42)\r\nOct 23 12:01:56 gogs gogs[3980]: (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:113 (0x7bc177)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).run: vals, err := c.Invoke(c.handler())\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:104 (0x7bc05c)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).Next: c.run()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/go-macaron/session/session.go:186 (0x70f144)\r\nOct 23 12:01:56 gogs gogs[3980]: Sessioner.func1: ctx.Next()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/asm_amd64.s:437 (0x4f40ce)\r\nOct 23 12:01:56 gogs gogs[3980]: call32: CALLFN(·call32, 32)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:432 (0x8dddea)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:300 (0x8dcab1)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.Call: return v.call(\"Call\", in)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/go-macaron/inject/inject.go:117 (0xb78c42)\r\nOct 23 12:01:56 gogs gogs[3980]: (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:113 (0x7bc177)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).run: vals, err := c.Invoke(c.handler())\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:104 (0x7bc05c)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).Next: c.run()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/recovery.go:161 (0x7d14e2)\r\nOct 23 12:01:56 gogs gogs[3980]: Recovery.func1: c.Next()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/asm_amd64.s:437 (0x4f40ce)\r\nOct 23 12:01:56 gogs gogs[3980]: call32: CALLFN(·call32, 32)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:432 (0x8dddea)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:300 (0x8dcab1)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.Call: return v.call(\"Call\", in)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/go-macaron/inject/inject.go:117 (0xb78c42)\r\nOct 23 12:01:56 gogs gogs[3980]: (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:113 (0x7bc177)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).run: vals, err := c.Invoke(c.handler())\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:104 (0x7bc05c)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).Next: c.run()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/logger.go:40 (0x7d012e)\r\nOct 23 12:01:56 gogs gogs[3980]: Logger.func1: ctx.Next()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/asm_amd64.s:437 (0x4f40ce)\r\nOct 23 12:01:56 gogs gogs[3980]: call32: CALLFN(·call32, 32)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:432 (0x8dddea)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/reflect/value.go:300 (0x8dcab1)\r\nOct 23 12:01:56 gogs gogs[3980]: Value.Call: return v.call(\"Call\", in)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/github.com/go-macaron/inject/inject.go:117 (0xb78c42)\r\nOct 23 12:01:56 gogs gogs[3980]: (*injector).Invoke: return reflect.ValueOf(f).Call(in), nil\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/context.go:113 (0x7bc177)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Context).run: vals, err := c.Invoke(c.handler())\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/router.go:184 (0x7d2c54)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Router).Handle.func1: c.run()\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/router.go:286 (0x7c95dd)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Router).ServeHTTP: h(rw, req, p)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/git/go/src/gopkg.in/macaron.v1/macaron.go:175 (0x7c151a)\r\nOct 23 12:01:56 gogs gogs[3980]: (*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/net/http/server.go:1862 (0x6c6d0e)\r\nOct 23 12:01:56 gogs gogs[3980]: serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/net/http/server.go:1361 (0x6c44fe)\r\nOct 23 12:01:56 gogs gogs[3980]: (*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)\r\nOct 23 12:01:56 gogs gogs[3980]: /home/gogs/go/src/runtime/asm_amd64.s:1696 (0x4f63f1)\r\nOct 23 12:01:56 gogs gogs[3980]: goexit: BYTE        $0x90        // NOP\r\nOct 23 12:01:56 gogs gogs[3980]: [Macaron] Completed /WTsys/OpenELEC/issues/6/comments 500 Internal Server Error in 193.623784ms\r\n</pre>"},"comment":{"url":"https://api.github.com/repos/gogits/gogs/issues/comments/150623043","html_url":"https://github.com/gogits/gogs/issues/1830#issuecomment-150623043","issue_url":"https://api.github.com/repos/gogits/gogs/issues/1830","id":150623043,"user":{"login":"soul9","id":175965,"avatar_url":"https://avatars.githubusercontent.com/u/175965?v=3","gravatar_id":"","url":"https://api.github.com/users/soul9","html_url":"https://github.com/soul9","followers_url":"https://api.github.com/users/soul9/followers","following_url":"https://api.github.com/users/soul9/following{/other_user}","gists_url":"https://api.github.com/users/soul9/gists{/gist_id}","starred_url":"https://api.github.com/users/soul9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soul9/subscriptions","organizations_url":"https://api.github.com/users/soul9/orgs","repos_url":"https://api.github.com/users/soul9/repos","events_url":"https://api.github.com/users/soul9/events{/privacy}","received_events_url":"https://api.github.com/users/soul9/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T16:16:45Z","updated_at":"2015-10-23T16:16:45Z","body":"better. reopening doesn't cause error 500, but issue text (0th comment) is replaced by new comment both on \"comment and close\" and on \"comment and reopen\""}}