XCode 9 doesn't show exception when running iOS11 simulator

For some reason, if I get an exception when running an app in the iOS 11 simulator I don't get a call stack and no row is highlighted, which makes it hard to find the reason for the crash...


I just get this:

Thread 1: signal SIGABRT

libc++abi.dylib: terminating with uncaught exception of type NSException


However, if I get an exception while using the iOS 10 simulator, everything works as intended - the faulty line/row in my code is highlighted and I get a call stack and an error message which actually makes sense...

Replies

We have the same problem. Did anyone find a solution or a workaround so far?

I've got the same issue with iOS 11.


I'm using Xcode 9.1:


Running on an iOS 11 device or simulator just produces a meaningless stack trace and and the following into the console:

libc++abi.dylib: terminating with uncaught exception of type NSException


Running on a device or simulator with an OS version previous to iOS 11 xcode is able to provide me the stack trace correctly.


I don't know how to fix this just yet, but you can use Exception Breakpoints as a workaround, see the section titled "The Exception Breakpoint" in the below article for help: https://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1

Just providing an update on this.


Still having this issue on Xcode 9.2 on iOS 11.2.2.


I don't see any other posts related to this so I'm wondering if it's some sort of project setup issue, but it just doesn't feel like it. I've tried changing deployment targets and have made sure my Base SDK is the highest (currently 11.2).

Hello,


Did you set the OS_ACTIVITY_MODE variable by any chance?

To check if you have this variable set (and turn it off), in Xcode 9, do the following:

  1. Select from Xcode menu Product -> Scheme -> Edit Scheme..
  2. Select the Run scheme and look under Arguments.
  3. If you see the OS_ACTIVITY_MODE variable checked, deselect it.

Thank you!! This worked for me.

Thanks jeromeshr.


It's worked for me as well.

Thank you. Can't figure how this variable got checked and what purpose it has…

Thank you very much!!!

I can't understand why this isn't marked as the correct answer...