niklasfasching / go-org

Org mode parser with html & pretty printed org rendering. also shitty static site generator.
https://niklasfasching.github.io/go-org/
MIT License
355 stars 49 forks source link

Hugo Could not render org #99

Closed tianheg closed 1 year ago

tianheg commented 1 year ago

This error cannot be reproduced with certainty.

a minimal reproducible example: https://github.com/tianheg/hugo-render-org-error , use hugo v0.111.1

Errors like:

Could not render org: could not write output: runtime error: invalid memory address or nil pointer dereference. Using unrendered content.

or

Could not render org: could not write output: runtime error: unsafe.String: len out of range. Using unrendered content.

Error from Hugo source code.

I don't understand Golang. I post this error to Hugo Forum. Thanks for @jmooring and @kaushalmodi 's help. I came here, keep looking for help.

niklasfasching commented 1 year ago

D'oh! Fixed in https://github.com/niklasfasching/go-org/commit/5464ab3/ (couldn't reproduce the second error, but I'm assuming it's caused by the same race condition)

corresponding PR to update go-org in hugo https://github.com/gohugoio/hugo/pull/10824

tianheg commented 1 year ago

Thank you very much! This problem has been bothering me for a long time.