I'm working on a Reverse Polish Notation calculator for my Data Structures
class and I get a segfault when I pass arguments to the program at runtime. How
do you guys troubleshoot errors without line numbers?
do you iterate over the array? Then it might be related to
[https://github.com/nim-lang/Nim/issues/12747](https://github.com/nim-lang/Nim/issues/12747)
Thanks, it was effectively a stack overflow. Having a ref array instead of an
array defined for the matrix type used as deeper procs' parameters did the
trick.
> Is there something I can try before creating a minimal example and opening a
> bug?
Reduce the involved data structure sizes and see if the crash disappears. If
so, you might simply put too much data onto the stack causing a crash.
My program does not do tricky system things, only using ref object to build a
toroid matrix, letting the compiler initialize all the objects. It segfaults
when building the matrix, without any stack trace. I've tried placing echo and
debugEcho in calls to get how far in the code it runs, but apa