Open willfaught opened 1 year ago
Another, different panic when changing branches:
Change detected, rebuilding site.
2023-03-29 21:04:22.342 -0700
Source changed CREATE "/Users/Will/Developer/paige/exampleSite/content/_index.md"
Template changed CREATE "/Users/Will/Developer/paige/layouts/partials/paige/img.html"
Template changed CREATE "/Users/Will/Developer/paige/layouts/shortcodes/paige/image.html"
Total in 126 ms
Rebuilt in 250 ms
panic: runtime error: index out of range [0] with length 0
goroutine 3593 [running]:
github.com/gohugoio/hugo/hugolib.(*pageState).shiftToOutputFormat(0xc0065dae70, 0x1, 0x0)
github.com/gohugoio/hugo/hugolib/page.go:890 +0x450
github.com/gohugoio/hugo/hugolib.(*pageState).initOutputFormat(...)
github.com/gohugoio/hugo/hugolib/page.go:486
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender.func1(0xc004d35340?)
github.com/gohugoio/hugo/hugolib/hugo_sites.go:853 +0x2a
github.com/gohugoio/hugo/hugolib.(*pageMap).withEveryBundlePage.func1({0xc0065da480?, 0x100d24801?}, 0x0?)
github.com/gohugoio/hugo/hugolib/content_map_page.go:691 +0x2a
github.com/gohugoio/hugo/hugolib.contentTrees.Walk.func1({0xc00586ddd0?, 0x1011b0c89?}, {0x101b49da0?, 0xc003c37b30?})
github.com/gohugoio/hugo/hugolib/content_map.go:876 +0x3b
github.com/armon/go-radix.recursiveWalk(0xc003c37b90, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:519 +0x45
github.com/armon/go-radix.recursiveWalk(0xc003c37aa0?, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:525 +0xa6
github.com/armon/go-radix.recursiveWalk(0xc0005aac78?, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:525 +0xa6
github.com/armon/go-radix.recursiveWalk(0xc0084ac6c0?, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:525 +0xa6
github.com/armon/go-radix.recursiveWalk(0x3?, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:525 +0xa6
github.com/armon/go-radix.recursiveWalk(0xc006cd8a00?, 0xc004d35508)
github.com/armon/go-radix@v1.0.0/radix.go:525 +0xa6
github.com/armon/go-radix.(*Tree).Walk(...)
github.com/armon/go-radix@v1.0.0/radix.go:447
github.com/gohugoio/hugo/hugolib.contentTrees.Walk({0xc003314980, 0x4, 0xd0?}, 0xc004d35548)
github.com/gohugoio/hugo/hugolib/content_map.go:874 +0x5b
github.com/gohugoio/hugo/hugolib.(*pageMap).withEveryBundlePage(0xc00006a900?, 0xc006cec270?)
github.com/gohugoio/hugo/hugolib/content_map_page.go:689 +0x47
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender(0x10355e880?, 0x0?, 0xc0001a4008?)
github.com/gohugoio/hugo/hugolib/hugo_sites.go:852 +0x5e
github.com/gohugoio/hugo/hugolib.(*HugoSites).render(0xc0093d89c0, 0xc002e2b220)
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:307 +0x566
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func4()
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:146 +0x2a
runtime/trace.WithRegion({0x10248a5e0?, 0xc00882aed0?}, {0x101debbd1, 0x6}, 0xc004d358e8)
runtime/trace/annotation.go:141 +0xe3
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc0093d89c0, {0x0, {0x0, 0x0}, 0x0, 0x0, 0x0, 0x0, 0xc00882aea0, 0x0, ...}, ...)
github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:148 +0x5f3
github.com/gohugoio/hugo/commands.(*commandeer).rebuildSites(0xc00084aa00, {0xc0090afe00?, 0x6?, 0x8?})
github.com/gohugoio/hugo/commands/hugo.go:766 +0x346
github.com/gohugoio/hugo/commands.(*commandeer).handleEvents.func4(0xc00084aa00, 0xc005451680)
github.com/gohugoio/hugo/commands/hugo.go:1162 +0x96
github.com/gohugoio/hugo/commands.(*commandeer).handleEvents(0xc00084aa00, 0xc003fc47e0, 0xc0044d1fc8, {0xc0086ae3c0?, 0x6, 0x8}, 0xc001a4a170?)
github.com/gohugoio/hugo/commands/hugo.go:1165 +0x13be
github.com/gohugoio/hugo/commands.(*commandeer).newWatcher.func1()
github.com/gohugoio/hugo/commands/hugo.go:896 +0x24b
created by github.com/gohugoio/hugo/commands.(*commandeer).newWatcher
github.com/gohugoio/hugo/commands/hugo.go:887 +0x4ca
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes