helm-docs icon indicating copy to clipboard operation
helm-docs copied to clipboard

[Bug] - invalid memory address or nil pointer error

Open prashant-shahi opened this issue 3 years ago • 1 comments

I am getting the nil pointer error when I run helm-docs. It was working couple of days back.

Click to expand Error Log!
INFO[2022-06-27T18:02:14+05:30] Found Chart directories [.]                  
INFO[2022-06-27T18:02:14+05:30] Generating README Documentation for chart charts/my-helm-chart
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x6d1f03]

goroutine 49 [running]:
github.com/norwoodj/helm-docs/pkg/document.createValueRowsFromObject({0x0, 0x17a}, 0x0, 0xc0000d0a00, 0x12, 0x1)
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/pkg/document/values.go:315 +0x4c3
github.com/norwoodj/helm-docs/pkg/document.createValueRowsFromField({0x0, 0xc00039e270}, 0xc0002f93e8, 0x669192, 0x71c760, 0xb0)
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/pkg/document/values.go:384 +0x4e
github.com/norwoodj/helm-docs/pkg/document.getUnsortedValueRows(0xc00038f320, 0xc0002f9470)
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/pkg/document/model.go:91 +0xd0
github.com/norwoodj/helm-docs/pkg/document.getChartTemplateData({{{0xc0000ac03a, 0x2}, {0xc0000ac0b0, 0x6}, {0x0, 0x0}, {0xc0000ac050, 0xa}, 0x0, {0xc0000941c0, ...}, ...}, ...}, ...)
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/pkg/document/model.go:95 +0x8f
github.com/norwoodj/helm-docs/pkg/document.PrintDocumentation({{{0xc0000ac03a, 0x2}, {0xc0000ac0b0, 0x6}, {0x0, 0x0}, {0xc0000ac050, 0xa}, 0x0, {0xc0000941c0, ...}, ...}, ...}, ...)
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/pkg/document/generate.go:44 +0x289
main.writeDocumentation.func1({0x7080c0, 0xc0000b2f60})
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/cmd/helm-docs/main.go:117 +0x208
main.parallelProcessIterable.func1()
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/cmd/helm-docs/main.go:34 +0x87
created by main.parallelProcessIterable
        /home/codegeas/go/pkg/mod/github.com/norwoodj/[email protected]/cmd/helm-docs/main.go:31 +0x8c

prashant-shahi avatar Jun 27 '22 13:06 prashant-shahi

Hey @prashant-shahi Could you add a zip of the chart you're running against that causes this bug? Happy to figure out what's going on.

norwoodj avatar Jun 29 '22 09:06 norwoodj

Hey @prashant-shahi . Do you still have the Chart?

Nepo26 avatar Jun 29 '23 11:06 Nepo26

@norwoodj @Nepo26 It was long time back, I do not have it.

I do remember getting rid of the recent changes entirely because of this.

prashant-shahi avatar Jun 29 '23 19:06 prashant-shahi

Oh okay. It is understandable. You keep an eye out in case the issue resurfaces.

Is it okay if I close it @prashant-shahi ?

Nepo26 avatar Jun 30 '23 01:06 Nepo26