Error On Windows 7 untime error: invalid memory address or nil pointer dereference

MY@MY-PC MINGW32 ~/Desktop/hugo-starter
$ hugo server
Started building sites …
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x66ea2c]

goroutine 57 [running]:
panic(0x9f3320, 0x123c4030)
/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:500 +0x331
text/template.errRecover(0x127ddc7c)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:140 +0xd9
panic(0x9f3320, 0x123c4030)
/usr/local/Cellar/go/1.7.4/libexec/src/runtime/panic.go:458 +0x40b
sync/atomic.AddUint64(0x125aacac, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/sync/atomic/asm_386.s:112 +0xc
github.com/spf13/hugo/hugolib.(*SiteInfo).addToPaginationPageCount(0x125aaca8, 0x0, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:454 +0x3b
github.com/spf13/hugo/hugolib.(*Page).Paginate.func1()
/Users/bep/go/src/github.com/spf13/hugo/hugolib/pagination.go:337 +0x18a
sync.(*Once).Do(0x127a8084, 0x127dd394)
/usr/local/Cellar/go/1.7.4/libexec/src/sync/once.go:44 +0xcf
github.com/spf13/hugo/hugolib.(*Page).Paginate(0x12757900, 0xa48ec0, 0x12828130, 0xd6d400, 0x0, 0x0, 0x0, 0x0, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/pagination.go:340 +0x289
reflect.Value.call(0xa566c0, 0x12757900, 0x7613, 0xa58cbf, 0x4, 0x12815e60, 0x2, 0x2, 0x0, 0x0, …)
/usr/local/Cellar/go/1.7.4/libexec/src/reflect/value.go:434 +0xdd7
reflect.Value.Call(0xa566c0, 0x12757900, 0x7613, 0x128280f0, 0x1, 0x1, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/reflect/value.go:302 +0x8c
text/template.(*state).evalCall(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0xa566c0, 0x12757900, 0x7613, 0xd28620, 0x126d5de0, 0x126b0683, …)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:658 +0x87d
text/template.(*state).evalField(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0x126b0683, 0x8, 0xd28620, 0x126d5de0, 0x1267f790, 0x2, …)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:549 +0x301
text/template.(*state).evalFieldChain(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0xa566c0, 0x12757900, 0x16, 0xd28620, 0x126d5de0, 0x126d28d8, …)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:520 +0x1d4
text/template.(*state).evalFieldNode(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0x126d5de0, 0x1267f790, 0x2, 0x2, 0x0, 0x0, …)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:484 +0x11e
text/template.(*state).evalCommand(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0x126d5dc0, 0x0, 0x0, 0x0, 0x0, 0x0, …)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:422 +0x810
text/template.(*state).evalPipeline(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0x126da510, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:400 +0x11c
text/template.(*state).walk(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0xd284a0, 0x126d8fa0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:226 +0x18a
text/template.(*state).walk(0x127ddc40, 0xa566c0, 0x12757900, 0x16, 0xd286e0, 0x126d8dc0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:234 +0x523
text/template.(*Template).execute(0x126d8d60, 0xd22e40, 0x127b1b00, 0xa566c0, 0x12757900, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:189 +0x1e3
text/template.(*Template).Execute(0x126d8d60, 0xd22e40, 0x127b1b00, 0xa566c0, 0x12757900, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/text/template/exec.go:175 +0x4b
html/template.(*Template).Execute(0x126d8d80, 0xd22e40, 0x127b1b00, 0xa566c0, 0x12757900, 0x0, 0x0)
/usr/local/Cellar/go/1.7.4/libexec/src/html/template/template.go:104 +0x7b
github.com/spf13/hugo/hugolib.(*Site).renderThing(0x125aac80, 0xa566c0, 0x12757900, 0x128157a0, 0x18, 0xd22e40, 0x127b1b00, 0x0, 0x0)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1836 +0x8a
github.com/spf13/hugo/hugolib.(*Site).renderForLayouts(0x125aac80, 0xa5ae83, 0x5, 0xa566c0, 0x12757900, 0xd22e40, 0x127b1b00, 0x12705e00, 0x10, 0x10, …)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1808 +0x1ab
github.com/spf13/hugo/hugolib.(*Site).renderAndWritePage(0x125aac80, 0xa5ae83, 0x5, 0x12813960, 0xe, 0xa566c0, 0x12757900, 0x12705e00, 0x10, 0x10, …)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site.go:1715 +0xea
github.com/spf13/hugo/hugolib.pageRenderer(0x125aac80, 0x12775c00, 0x12775bc0, 0x1277ac90)
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site_render.go:73 +0x34f
created by github.com/spf13/hugo/hugolib.(*Site).renderPages
/Users/bep/go/src/github.com/spf13/hugo/hugolib/site_render.go:46 +0x142

It looks like you have an older version of Hugo. Please try the latest version of Hugo and let us know if this error still occurs.

1 Like

Thanks… @moorereason

This works :+1: