gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.73k stars 7.53k forks source link

0.56.x can't compile already working site #6156

Closed GiorgosK closed 5 years ago

GiorgosK commented 5 years ago

on a working website running hugo with any of the 0.56.x releases I get the following error

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

goroutine 15 [running]: github.com/gohugoio/hugo/hugofs.(*fileInfoMeta).IsDir(0xc002104080, 0xc001c6f2d0)

:1 +0x32 github.com/spf13/afero.IsDir(0x1c43a80, 0xc0006eaa80, 0xc001c6f2d0, 0xc, 0x0, 0x0, 0x0) /build/hugo/parts/hugo/go/pkg/mod/github.com/spf13/afero@v1.2.2/util.go:279 +0x85 github.com/spf13/afero.(*CopyOnWriteFs).Open(0xc0006f5280, 0xc001c6f2d0, 0xc, 0x186b0cb, 0x7, 0xc001b04db2, 0x4) /build/hugo/parts/hugo/go/pkg/mod/github.com/spf13/afero@v1.2.2/copyOnWriteFs.go:232 +0xb6 github.com/gohugoio/hugo/hugofs.(*languageCompositeFs).Open(0xc0005d2660, 0xc001c6f2d0, 0xc, 0xc001c6f2d0, 0xc, 0x0, 0x0) /build/hugo/parts/hugo/build/hugofs/language_composite_fs.go:43 +0x46 github.com/spf13/afero.(*BasePathFs).Open(0xc0006f53c0, 0xc001b04db2, 0x4, 0xc001adc8f0, 0x16070f0, 0x0, 0xbf892c) /build/hugo/parts/hugo/go/pkg/mod/github.com/spf13/afero@v1.2.2/basepath.go:136 +0x173 github.com/gohugoio/hugo/hugofs.(*FilterFs).Open(0xc0006f53e0, 0xc001b04db2, 0x4, 0x8, 0xc001bac1a8, 0x1, 0x0) /build/hugo/parts/hugo/build/hugofs/filter_fs.go:175 +0x4b github.com/gohugoio/hugo/hugofs.(*Walkway).walk(0xc0004de2d0, 0xc001b04db2, 0x4, 0x1c37a00, 0xc001b14740, 0x0, 0x0, 0x0, 0x193eb20, 0x0, ...) /build/hugo/parts/hugo/build/hugofs/walk.go:182 +0xc23 github.com/gohugoio/hugo/hugofs.(*Walkway).walk(0xc0004de2d0, 0x0, 0x0, 0x1c37a00, 0xc001a7f640, 0xc00135e400, 0x8e, 0x8e, 0x193eb20, 0xc0006f53e0, ...) /build/hugo/parts/hugo/build/hugofs/walk.go:290 +0x770 github.com/gohugoio/hugo/hugofs.(*Walkway).Walk(0xc0004de2d0, 0xc0006f53e0, 0x0) /build/hugo/parts/hugo/build/hugofs/walk.go:137 +0x1dd github.com/gohugoio/hugo/hugolib.(*pagesCollector).collectDir(0xc001a38230, 0x0, 0x0, 0x1c2a500, 0x0, 0xc00195f440, 0xb) /build/hugo/parts/hugo/build/hugolib/pages_capture.go:323 +0x38a github.com/gohugoio/hugo/hugolib.(*pagesCollector).Collect(0xc001a38230, 0x0, 0x0) /build/hugo/parts/hugo/build/hugolib/pages_capture.go:120 +0x473 github.com/gohugoio/hugo/hugolib.(*Site).readAndProcessContent(0xc000484e00, 0x0, 0x0, 0x0, 0x1941040, 0xc0001fdc54) /build/hugo/parts/hugo/build/hugolib/site.go:1317 +0x189 github.com/gohugoio/hugo/hugolib.(*Site).process(0xc000484e00, 0x0, 0x0, 0x0, 0x0, 0xc001a86620, 0x0, 0x0, 0xd67116, 0xc0001fdb88) /build/hugo/parts/hugo/build/hugolib/site.go:1085 +0x62 github.com/gohugoio/hugo/hugolib.(*HugoSites).process(0xc0006e0300, 0xc001a7de00, 0x0, 0x0, 0x0, 0xc00007dc60, 0x20) /build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:223 +0x197 github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2.1() /build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:96 +0x57 runtime/trace.WithRegion(0x1c2a5e0, 0xc001a8d6b0, 0x186c6ea, 0x7, 0xc00007dd38) /snap/go/4098/src/runtime/trace/annotation.go:137 +0xe9 github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2(0xc0008095b8, 0x20) /build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:98 +0x1b0 github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func3() /build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:115 +0x2f runtime/trace.WithRegion(0x1c2a5e0, 0xc001a8d6b0, 0x186c688, 0x7, 0xc0008096c8) /snap/go/4098/src/runtime/trace/annotation.go:137 +0xe9 github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc0006e0300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) /build/hugo/parts/hugo/build/hugolib/hugo_sites_build.go:117 +0x7d9 github.com/gohugoio/hugo/commands.(*commandeer).buildSites(...) /build/hugo/parts/hugo/build/commands/hugo.go:707 github.com/gohugoio/hugo/commands.(*commandeer).fullBuild.func3(0x8, 0x1941060) /build/hugo/parts/hugo/build/commands/hugo.go:318 +0x79 golang.org/x/sync/errgroup.(*Group).Go.func1(0xc001a8d650, 0xc001a865f0) /build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.0.0-20190423024810-112230192c58/errgroup/errgroup.go:57 +0x57 created by golang.org/x/sync/errgroup.(*Group).Go /build/hugo/parts/hugo/go/pkg/mod/golang.org/x/sync@v0.0.0-20190423024810-112230192c58/errgroup/errgroup.go:54 +0x66

Downgrading to 0.55.6 makes hugo command work again

I have seen this happening on ubuntu 16.04 and 18.04 2 different systems

bep commented 5 years ago

Thanks for the report, but without the actual site source, I'm afraid I cannot tell what's happening.

GiorgosK commented 5 years ago

@bep thanks for looking into it Yes sure, here is the site that caused the trouble above https://github.com/bitbaydev/bitbaydev

yagee-de commented 5 years ago

@bep The same issue here: https://github.com/MyCoRe-Org/mycore-website

The site works if I delete the folder mycore.org/content/io.

yagee-de commented 5 years ago

@bep still not working in v0.59.0

zbayoff commented 5 years ago

@bep Here is a test repo, made from the quickstart guide. https://github.com/zbayoff/quickstart It should fail to compile. If you rename the folder fr/other to fr/blog, it should build successfully. Does every language need to have all of the same folders and files? What if a language only contains a few translated pages and wants to display those?

yagee-de commented 5 years ago

seems to be fixed in v0.59.1

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.