SIGSEV when adding to sections

Hugo crashes for me as soon as I add an file to a section directory. The content of the file does not matter, even an empty file leads to the crash. I’m on Mac, current home-brew build:
hugo v0.103.1+extended darwin/amd64 BuildDate=unknown

DEBUG 2022/09/19 22:16:44 creating alias: /teleskope/page/1/index.html redirecting to http://localhost:1313/teleskope/
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x513b0d1]

goroutine 138 [running]:*pageState).getLayoutDescriptor.func1() +0xf1
sync.(*Once).doSlow(0x0?, 0x5d52afb?)
	sync/once.go:74 +0xc2
	sync/once.go:65*pageState).getLayoutDescriptor(0xc0001e7830?) +0x7d*pageState).resolveTemplate(0xc0001e7830, {0x0, 0x0, 0xc002e552c0?}) +0x1cd, 0xc0005b4d80, 0xc0000b67d0?, 0x4ca1506?, 0xc0000b6798?) +0x113
created by*Site).renderPages +0x108

terms.html (modified from anananke theme - but the original leads to the same problem):

{ define "main" }}
  {{ $data := .Data }}
  <article class="cf pa3 pa4-m pa4-l">
    <div class="measure-wide-l center f4 lh-copy nested-copy-line-height nested-links {{ $.Param "text_color" | default "mid-gray" }} {{ $.Param "post_content_classes" | default "bg-near-white" }}">
      {{ .Content }}
  <div class="mw8 center">
    <section class="ph4  {{ $.Param "secondary_text_color" | default "mid-gray" }} {{ $.Param "post_content_classes" | default "bg-near-white" }}">
      {{ range $key, $value := .Data.Terms }}
        <h2 class="f1">
          <a href=" {{$value.Page.RelPermalink }}">
            {{ $value.Page.Title }}
        {{ range $value.Pages }}
          {{ .Render "summary-with-image" }}
        {{ end }}
      {{ end }}
{{ end }}

Taxonomy definition in config.toml:

    title = "Astrofotografie Torben van Hees"
    weight = 1
    contentDir = "content/de"
      Kategorie = 'Kategorien'
      Schlagwort = 'Schlagworte'
      Kamera = 'Kameras'
      Teleskop = 'Teleskope'
      Montierung = 'Montierungen'
      Objekt = 'Objekte'
      Filter = 'Filter'

I am unable to reproduce the problem as described. Tested with v0.103.1.

Please post a link to the public repository for your project.


Let us see your code

Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.

If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.