Hugo 65 - panic: runtime error on building site

Hello. Just updated to latest version of hugo but i get some strange error messages when trying to build the site (hugo serve) , its not the normal hugo errors but looks to be from “go”:

Building sites … panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x55713d3c1e98]

goroutine 102 [running]:, 0xc0008b7d90, 0x55713ea6eb00)
	/build/go/pkg/mod/ +0x28, 0xc0008b7d90, 0x3)
	/build/go/pkg/mod/ +0x80, 0xc0008b7d90, 0x0)
	/build/go/pkg/mod/ +0x80*Tree).Walk(...)
	/build/hugo/src/hugo-0.65.0/hugolib/content_map.go:600 +0x5b*pageMap).assemblePages(0xc000223410, 0x0, 0x0)
	/build/hugo/src/hugo-0.65.0/hugolib/content_map_page.go:385 +0x100*pageMaps).AssemblePages.func1(0xc000223410, 0x0, 0x0)
	/build/hugo/src/hugo-0.65.0/hugolib/content_map_page.go:711 +0x6a*pageMaps).withMaps.func1(0x0, 0x0)
	/build/hugo/src/hugo-0.65.0/hugolib/content_map_page.go:772 +0x30*errGroupRunner).Run.func1(0xc00045ff68, 0x0)
	/build/hugo/src/hugo-0.65.0/common/para/para.go:52 +0x31*Group).Go.func1(0xc00093fbc0, 0xc00095ebe0)
	/build/go/pkg/mod/ +0x66
created by*Group).Go
	/build/go/pkg/mod/ +0x68

I fixed an old warning (regarding .File.Dir not using {{ with .File }}) i have been ignoring, but that didn’t fix this either. Downgrading to 0.64 worked fine though.

It’s a quite large and complex hugo project, wip, so I don’t think it will help much to share the source for that.

This report is more about the error message should print information on what in my project is causing the panic and not, well, that stuff.