Break on @main with out any break points set.

I am getting an error when taping to open a document while in debugger with an actual iPadAir. It appears on @main. The program runs without the debugger attached. The error message tells nothing about what is wrong. It only does it some times but about 90% of the time making debugging impossible.

Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1a8321ba8)

That's not where the error is. It is just the place where debugger returns after crash.

You have to find where is the crash, for instance by adding some print statements at the place of last action before crash.

An EXC_BREAKPOINT generally indicates a precondition failure, where a function verifies that the incoming arguments to the function are sane or non-nil, or other surrounding context like threading considerations, are viable.

You're seeing the main frame highlighted because that's the last frame in your code base for the specific call stack. You should inspect the backtrace in the debugger to see what other code is involved. Alternatively, you can detach the debugger at this point so the system generates the standard crash report. In either case, by looking at what other code is involved in the call stack, you can analyze how your code is related (even if your related code is not in the backtrace) to understand the source of the crash.

Break on @main with out any break points set.
 
 
Q