Skip to content

Instantly share code, notes, and snippets.

@earwig
Created September 16, 2018 20:17
Show Gist options
  • Save earwig/f44165540933bbe277a4704136ba80b9 to your computer and use it in GitHub Desktop.
Save earwig/f44165540933bbe277a4704136ba80b9 to your computer and use it in GitHub Desktop.
gitea panic
[Macaron] 2018-09-16 16:16:20: Started GET /ben/testrepo for 127.0.0.1
[Macaron] PANIC: html: InsertBefore called for an attached child Node
/usr/local/go/src/runtime/panic.go:513 (0x402dff8)
gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/golang.org/x/net/html/node.go:55 (0x45ddcfa)
replaceContent: panic("html: InsertBefore called for an attached child Node")
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:356 (0x45ddcfa)
replaceContent: node.Parent.InsertBefore(newNode, nextSibling)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:526 (0x45de9a4)
shortLinkProcessorFull: replaceContent(node, m[0], m[1], linkNode)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:303 (0x45dd883)
(*postProcessCtx).visitNodeForShortLinks: shortLinkProcessorFull(ctx, node, true)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:309 (0x45dd849)
(*postProcessCtx).visitNodeForShortLinks: ctx.visitNodeForShortLinks(n)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:289 (0x45dd797)
(*postProcessCtx).visitNode: ctx.visitNodeForShortLinks(node)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:294 (0x45dd74c)
(*postProcessCtx).visitNode: ctx.visitNode(n)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:294 (0x45dd74c)
(*postProcessCtx).visitNode: ctx.visitNode(n)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:294 (0x45dd74c)
(*postProcessCtx).visitNode: ctx.visitNode(n)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:258 (0x45dd1a3)
(*postProcessCtx).postProcess: ctx.visitNode(node)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/html.go:200 (0x45dcc4c)
PostProcess: return ctx.postProcess(rawHTML)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/markup.go:75 (0x45e2903)
render: result, err := PostProcess(result, urlPrefix, metas, isWiki)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/markup.go:92 (0x45e2c0e)
renderFile: return render(parser, rawBytes, urlPrefix, metas, isWiki)
/Users/ben/.local/go/src/code.gitea.io/gitea/modules/markup/markup.go:53 (0x45e249b)
Render: return renderFile(filename, rawBytes, urlPrefix, metas, false)
/Users/ben/.local/go/src/code.gitea.io/gitea/routers/repo/view.go:105 (0x4b26910)
renderDirectory: ctx.Data["FileContent"] = string(markup.Render(readmeFile.Name(), buf, treeLink, ctx.Repo.Repository.ComposeMetas()))
/Users/ben/.local/go/src/code.gitea.io/gitea/routers/repo/view.go:345 (0x4b2a30e)
renderCode: renderDirectory(ctx, treeLink)
/Users/ben/.local/go/src/code.gitea.io/gitea/routers/repo/view.go:285 (0x4b29b6f)
Home: renderCode(ctx)
/usr/local/go/src/runtime/asm_amd64.s:522 (0x405caea)
call32: CALLFN(·call32, 32)
/usr/local/go/src/reflect/value.go:447 (0x40c0a08)
Value.call: call(frametype, fn, args, uint32(frametype.size), uint32(retOffset))
/usr/local/go/src/reflect/value.go:308 (0x40c04a3)
Value.Call: return v.call("Call", in)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:177 (0x43f03d3)
(*injector).callInvoke: return reflect.ValueOf(f).Call(in), nil
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:137 (0x43efd39)
(*injector).Invoke: return inj.callInvoke(f, t, t.NumIn())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x441de50)
(*Context).run: vals, err := c.Invoke(c.handler())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x441dd6e)
(*Context).Next: c.run()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/session/session.go:186 (0x4471a0e)
Sessioner.func1: ctx.Next()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:79 (0x441dcf0)
ContextInvoker.Invoke: invoke(params[0].(*Context))
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x43f00c0)
(*injector).fastInvoke: return f.Invoke(in)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x43efe2b)
(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x441de50)
(*Context).run: vals, err := c.Invoke(c.handler())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x441dd6e)
(*Context).Next: c.run()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/recovery.go:161 (0x442eb1a)
Recovery.func1: c.Next()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:40 (0x4420ff3)
LoggerInvoker.Invoke: invoke(params[0].(*Context), params[1].(*log.Logger))
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x43f00c0)
(*injector).fastInvoke: return f.Invoke(in)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x43efe2b)
(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x441de50)
(*Context).run: vals, err := c.Invoke(c.handler())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:112 (0x441dd6e)
(*Context).Next: c.run()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:52 (0x442de30)
Logger.func1: ctx.Next()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/logger.go:40 (0x4420ff3)
LoggerInvoker.Invoke: invoke(params[0].(*Context), params[1].(*log.Logger))
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:157 (0x43f00c0)
(*injector).fastInvoke: return f.Invoke(in)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/go-macaron/inject/inject.go:135 (0x43efe2b)
(*injector).Invoke: return inj.fastInvoke(v, t, t.NumIn())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/context.go:121 (0x441de50)
(*Context).run: vals, err := c.Invoke(c.handler())
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:187 (0x442fd14)
(*Router).Handle.func1: c.run()
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/router.go:303 (0x442966e)
(*Router).ServeHTTP: h(rw, req, p)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/gopkg.in/macaron.v1/macaron.go:220 (0x44222e1)
(*Macaron).ServeHTTP: m.Router.ServeHTTP(rw, req)
/Users/ben/.local/go/src/code.gitea.io/gitea/vendor/github.com/gorilla/context/context.go:141 (0x479477a)
ClearHandler.func1: h.ServeHTTP(w, r)
/usr/local/go/src/net/http/server.go:1964 (0x42c11c3)
HandlerFunc.ServeHTTP: f(w, r)
/usr/local/go/src/net/http/server.go:2741 (0x42c3eaa)
serverHandler.ServeHTTP: handler.ServeHTTP(rw, req)
/usr/local/go/src/net/http/server.go:1847 (0x42c0225)
(*conn).serve: serverHandler{c.server}.ServeHTTP(w, w.req)
/usr/local/go/src/runtime/asm_amd64.s:1333 (0x405e7e0)
goexit: BYTE $0x90 // NOP
[Macaron] 2018-09-16 16:16:20: Completed GET /ben/testrepo 500 Internal Server Error in 123.372941ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment