After upgrading to Xcode 11.3, our app throws an exception when running on an iOS 13.3 device. The exception does not occur at the same place every time, and the log indicates the exception is coming from com.apple.CoreAnalytics (see below). The exception is only thrown once. And, the exception is NOT thrown when I run the app on the simulator. Thanks in advance for your thoughts and ideas!
Asked
Active
Viewed 593 times
7
-
Is the exception caught if you're not running under the debugger? Does it cause something to fail? – Phillip Mills Dec 28 '19 at 16:02
-
If I continue after the exception, the app runs normally. – nurider Dec 28 '19 at 16:13
-
And, if I run it without the debugger it runs normally and nothing fails. – nurider Dec 28 '19 at 16:41
-
1This sound identical or very similar to what I'm seeing. my XCode is 11.2.1 and the device (an iPad) is running 13.3 I reported my problem at https://stackoverflow.com/questions/59549614/ and I was directed over here. The 'com.apple.CoreAnalytics' stuff is the same as well. – Gallymon Jan 01 '20 at 06:43
1 Answers
8
Sometimes Apple's frameworks use exceptions as an internal messaging technique. They probably shouldn't do that, but the frameworks contain a lot of old code that doesn't always follow best practices. There is no harm done, because the framework, having thrown the exception, also catches it, which is why you run fine if the app just runs without the debugger. But if you run from Xcode and you have set an Exception Breakpoint, you will pause after the throw but before the catch. It looks like that's what's happening. So just remove that breakpoint.

matt
- 515,959
- 87
- 875
- 1,141
-
Thanks Matt. That sounds sensible. And thanks for authoring your books, I've gotten a lot out of them! – nurider Dec 30 '19 at 13:53
-
You might also want to report this to Apple as a bug. It seems to be new behavior. It might be part of the same bug as this: https://stackoverflow.com/questions/59524571/turning-on-thread-sanitizer-results-in-signal-sigabrt – matt Jan 01 '20 at 02:22