Thank you so much for the answers. I’m going to dig in a little deeper into the documentation. I do want to get
neatopack.c working. I’ve taken this as an exercise to get better acquainted with the code and I don’t mind spending a lot more time to get it right. Also, we really need all test cases we can get.
Regarding the different backtraces; I could get different ones just by running the program many times. Also, compiling with
-fsanitize=address affected the backtrace. Since the problems were caused by using uninitialized memory as a pointer, the consequences could be rather unpredictable. It was much more deterministic when using
-fsanitize=address. Before fixing the first problem I got one backtrace, after that another and after fixing the second problem, a third. I wouldn’t pay that much attention to the exact backtrace.
Please note this comment in
gvlayout.c: “Check that the root graph has been initialized. If not, initialize it” which was the reason I made the first fix there. Perhaps this wouldn’t be necessary either if some kind of initialization is made in
neatopack.c before calling
Also note that I consider the commented out call to gvFreeLayout in
neatopack.c a workaround to get the program to finish and produce output, not a fix.