I have started wrapping [Ipopt](https://github.com/coin-or/Ipopt), a numerical optimizer. As always, the beginnings are hard. I wrapped it with c2nim. Now I am getting a memory error that I have reported [here](https://github.com/coin-or/Ipopt/issues/371).
I have put my code [here](https://github.com/mantielero/ipopt.nim/tree/master/src). The ex01.nim code compiles fine, but when I run it I get the failure: ****************************************************************************** This program contains Ipopt, a library for large-scale nonlinear optimization. Ipopt is released as open source code under the Eclipse Public License (EPL). For more information visit http://projects.coin-or.org/Ipopt ****************************************************************************** This is Ipopt version 3.13.0, running with linear solver mumps. NOTE: Other linear solvers might be more efficient (see Ipopt documentation). malloc(): corrupted top size Traceback (most recent call last) /home/jose/src/ipopt.nim/src/ex01.nim(312) ex01 SIGABRT: Abnormal termination. It is recommending me to run a debugger (something that I have never used). I have checked [this](https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html#using-gdb-lldb), but I don't know how to find which variable is the one causing the problem. Any advise? A tutorial that might help me on finding this particular issue?