[FIXED in 0.49] Traceback on "hugo server" reload (started with hugo 0.45)


#1

New thread, but following this one i guess :

  • Hugo 0.48 on MacOSX + long time site building flawlessly since early hugo versions.
  • I added a custom RSS feed (and a layout/_default/change-rss.xml if it can help identifying the problem) & suddenly a rebuild produce a stack trace + hugo still runs but no pages rendered on browser.
  • hugo builds without any problem.
  • If I revert my commit just before doing my custom RSS file, hugo server works flawlessly.
  • I investigate a bit and tested every hugo version I have (thanks to brew switch) on my Mac.
    • version <= 0.44 = no traceback. Server reload gracefully on every .md change.
    • version >= 0.45 = same traceback

Let me know if you need more information (repo is not public but i can send a zip without problem if it would help debug)

Change detected, rebuilding site
2018-10-09 11:38:02.598 +0200
Source changed "/Users/didiergeorgieff/Documents/Git/documentation/doc-adhoc-gti/adhoc/content/reference/utilitaires/chorus/_index.md": WRITE
ERROR 2018/10/09 11:38:02 Failed to render "_default/list.html": runtime error: invalid memory address or nil pointer dereference
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 451 [running]:
...
The full sttacktrace

Change detected, rebuilding site
2018-10-09 11:38:02.598 +0200
Source changed “/Users/didiergeorgieff/Documents/Git/documentation/doc-adhoc-gti/adhoc/content/reference/utilitaires/chorus/_index.md”: WRITE
ERROR 2018/10/09 11:38:02 Failed to render “_default/list.html”: runtime error: invalid memory address or nil pointer dereference
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 451 [running]:
github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4cc0dd3, 0x17)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/page.go:285 +0x76
github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc006bc37d0, 0xc000118300)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/site.go:1741 +0x135
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bc36c0)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bc2860)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bc1bb8)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/gohugoio/hugo/hugolib.(*Page).Sections(0x0, 0x0, 0x0, 0x0)
/private/tmp/hu
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 448 [running]:
github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4cc0dd3, 0x17)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/page.go:285 +0x76
github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc006bbb7d0, 0xc000118300)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/site.go:1741 +0x135
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bbb6c0)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bba860)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006bb9bb8)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/gohugoio/hugo/hugolib.(*Page).Sections(0x0, 0x0, 0x0, 0x0)
/private/tmp/hu
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 450 [running]:
github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4cc0dd3, 0x17)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/page.go:285 +0x76
github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc005b4d7d0, 0xc000118300)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/site.go:1741 +0x135
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc005b4d6c0)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc005b4c860)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc005b4bbb8)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/gohugoio/hugo/hugolib.(*Page).Sections(0x0, 0x0, 0x0, 0x0)
/private/tmp/hu
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 449 [running]:
github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4cc0dd3, 0x17)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/page.go:285 +0x76
github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc006a997d0, 0xc000118300)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/site.go:1741 +0x135
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006a996c0)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006a98860)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc006a97bb8)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/gohugoio/hugo/hugolib.(*Page).Sections(0x0, 0x0, 0x0, 0x0)
/private/tmp/hu
ERROR 2018/10/09 11:38:02 Failed to render “_default/single.html”: runtime error: invalid memory address or nil pointer dereference
ERROR 2018/10/09 11:38:02 Failed to render “index.html”: runtime error: invalid memory address or nil pointer dereference
ERROR 2018/10/09 11:38:02 Failed to render “404.html”: runtime error: invalid memory address or nil pointer dereference
ERROR 2018/10/09 11:38:02 Stack Trace:
goroutine 387 [running]:
github.com/gohugoio/hugo/hugolib.stackTrace(0x4b0, 0x4cc0dd3, 0x17)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/page.go:285 +0x76
github.com/gohugoio/hugo/hugolib.(*Site).renderForLayouts.func1(0xc0054712c0, 0xc000118300)
/private/tmp/hugo-20180829-34153-1opw9us/hugo-0.48/src/github.com/gohugoio/hugo/hugolib/site.go:1741 +0x135
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc0054711b0)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc005470350)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
text/template.errRecover(0xc00546f6a8)
/usr/local/Cellar/go/1.11/libexec/src/text/template/exec.go:160 +0x1d0
panic(0x4b8e560, 0x55f7650)
/usr/local/Cellar/go/1.11/libexec/src/runtime/panic.go:513 +0x1b9
github.com/gohugoio/hugo/hugolib.(*Page).Sections(0x0, 0x0, 0x0, 0x0)
/private/tmp/hu
Total in 298 ms
ERROR 2018/10/09 11:38:02 Failed to rebuild site: logged 9 error(s)


#2

Whoa … after testing all versions, i upgraded to 0.49 to be clean and sure i didn’t forget a version in my tests … and … it seems to reload nicely in v0.49 !!!

I’ll test it more and keep this issue updated (or close it, being sorry for the noise) accordingly.


#3

Yep. Can’t reproduce this in 0.49. I guess it was playing with #5138 in a dark corner.

I close this issue. Sorry for the noise.