I don't expect people to look through the complicated code that is the problem. I'm mostly looking for some debugging advice because I'm obviously doing something wrong, but at a loss of where to look.
When I compile my code with debugging on, there are no memory errors (checked with valgrind) and everything runs perfectly.
When I compile a "release" mode which includes -O3 and -DNDEBUG, the code segfaults almost immediately. However, when I insert a single output statement in one area of code,
ie,
std::cout << "Fine" << std::endl;
and recompile (with the same optimizations), everything runs perfectly once again.
Does anyone recognize any symptoms here or have any advice on what class of errors might be causing this bizarre behavior?
Thanks in advance.
