gurkankaymak / hocon

go implementation of lightbend's HOCON configuration library https://github.com/lightbend/config
MIT License
79 stars 17 forks source link

Invalid memory address or nil pointer dereference #36

Open sholsapp opened 1 year ago

sholsapp commented 1 year ago

Unfortunately when parsing my service's configuration, I get this error.

%!v(PANIC=String method: runtime error: invalid memory address or nil pointer dereference)

I can't share the full configuration and I'm in the midst of bisecting to see if I can hone in on what is causing the failure, but if there are any means to improve the error message here, perhaps provide a stack trace and/or point to the problematic file (since we use lots of include statements) that would help in debugging this failure.

gurkankaymak commented 1 year ago

@sholsapp with this information it's not possible for me to identify and solve the issue, you don't need to share your configuration, but you can replicate it (if possible problematic part of it) with dummy values

sholsapp commented 1 year ago

@gurkankaymak I understand that you cannot reproduce the issue with just a SIGSEGV. 😅

But my point was that my configuration is very large (tens of thousands of lines, 20+ fragments/include statements, lots of overlaying, etc.) and I'm having trouble finding the stanza of configuration that is actually causing the issue, so I cannot tell you how to reproduce the issue yet.

The ask here was if there are any ways we can make debugging this easier. I'm not a proficient Golang programmer yet so I'm not sure what to suggest yet, but if there was a way to provide a stack trace, logging the line that the failure occurs, and/or logging the part of the configuration that caused the error, that would help me hone in on the problematic section and provide a snippet with dummy values to reproduce the issue.

Thanks again for your help and responsiveness. You rock. 👍