I'm writing an iPhone/iPad App using Objective-C. It has been a few weeks since I last coded (holiday and family business).
Today, when I built and ran my App using XCode, it ran fine on my iPhone test device but the All Exceptions Breakpoint triggered on my iPad test device.
The BP didn't trigger immediately; it happened after fire-up when I touched the first button. Investigation showed that this would happen for any button I touched after fire-up. And more testing revealed that even if I didn't touch any buttons, the crash would occur after fire-up at approximately 63 seconds in.
The XCode's crash reports begin like this:
libc++abi.dylib`__cxa_throw:
-> 0x18c9c8b9c <+0>: stp x22, x21, [sp, #-0x30]!
0x18c9c8ba0 <+4>: stp x20, x19, [sp, #0x10]
0x18c9c8ba4 <+8>: stp x29, x30, [sp, #0x20]
0x18c9c8ba8 <+12>: add x29, sp, #0x20 ; =0x20
0x18c9c8bac <+16>: mov x19, x2
0x18c9c8bb0 <+20>: mov x20, x1
0x18c9c8bb4 <+24>: mov x21, x0
0x18c9c8bb8 <+28>: bl 0x18c9c89c0 ; __cxa_get_globals
Given that this was new behavior, I began to suspect a number of small changes I had made to the code base just before my first build of the day. So, I backed those changes out one by one until my code was as it had been. No effect, the BP still triggered on the iPad.
I tried a lot of stuff. I uninstalled the App and reinstalled it, I rebooted the iPad from scratch. I even went back and restored my development environment as it had been weeks ago when I last worked and saved it. None of this changed what was happening.
I've had this All Exceptions BP set for a long time. Someone had said it is a great way to catch rare things. That sounded good to me so I set it and then forgot it.
Well, I got curious as to what the crash would look like if I disabled the BP and let it run on through.
Amazing! Everything ran just as it should.
I poked around some more and discovered that if the BP was set and it trapped and then I told the code to continue, every thing was fine. And, if I left the BP disabled, the code just ran fine each time.
So, I'm quite baffled about all of this and I hate leaving mysteries behind me. It seems that an exception is occurring on my iPad test device and that if I don't trap it with my BP, the code continues on, heals whatever the issue is and and everything seems fine.
I know that as a Stack Overflow question, this entire query is pretty wide-open and general. But I'm looking for some thoughts on what might be going on and on if I am making a mistake to not go digging to try and to get tho the bottom of this weird situation. Thoughts?