iPhone/iPad fatal error in C++ code produces no output in the log
- by morgancodes
I'm trying to move away from Objective-C to C++ for audio in my iPad programming, due to the a few reports I've heard of Objective-C selectors sometimes causing audio glitches. So I'm starting to use pure C++ files.
When a fatal error happens in one of the C++ files, I get no output from the log. The app just crashes.
For example, if I do this in my C++ file:
env = new ADSR();
cout << "setting env to null\n";
env = NULL;
env->setSustainLevel(1);
cout << "called function on non-initialized env\n";
I get the following output:
setting env to null
After that, there's a method called on NULL, which apparently kills the app, but absolutely nothing to that effect is reported. What do I need to do to have useful information logged when there's an error in my C++ code?