Swift EXC_BREAKPOINT crash: "_TTSf4s_s_d_d___TFs18_fatalErrorMessageFTVs12StaticStringS_S_Su_T_"

Can anyone point me in the right direction as to the cause of a crash I'm getting in Swift?


I don't get any line numbers, I just know that it crashed inside a method that just creates multiple strings using string interpolation. So I can't narrow it down to a any specific line, therefore I don't know what direction to look in.


Crash details: com.apple.main-thread EXC_BREAKPOINT

Last line in crash log:


libswiftCore.dylib _TTSf4s_s_d_d___TFs18_fatalErrorMessageFTVs12StaticStringS_S_Su_T_


There's no warnings when building, and the crash has happened 5 times now during an adhoc build and I'm seeing the crash reports through Fabric / Crashlytics.


Any help would be greatly appreciated!

This EXC_BREAKPOINT crash is something that Swift uses when it wants to crash your app deliberately. The last method name is clearly a mangled name, but it's a pretty good guess that it's a result of your app calling 'fatalError' to crash itself. (It could have been library code, though, rather than a fatalError call you wrote.)


Since you're not getting line numbers, that suggests this is a release build of your app, without built-in debug information. In a release build, fatalError doesn't display its error message before crashing.


So you have a couple of choices. One is to find the dSYM (debug information) file that Xcode produced when you built the release build for distribution, and symbolicate the crash to find out the last line of your code that executed. Or, investigate the crash using a debug build (reproduce the problem in Xcode, or give a debug build to your tester if you can't reproduce the problem.), and you'll get additional information.

Swift EXC_BREAKPOINT crash: "_TTSf4s_s_d_d___TFs18_fatalErrorMessageFTVs12StaticStringS_S_Su_T_"
 
 
Q