unable to execute command: Segmentation fault: 11 swift frontend command failed due to signal (use -v to see invocation)

Salman Hasrat Khan picture Salman Hasrat Khan · Jul 29, 2014 · Viewed 43.6k times · Source

I have an iOS swift program that compiles and runs fine on Xcode Beta2. When I downloaded beta4, I got a few syntax errors for the new swift language which I corrected. I now get this error:

<unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)

The problem is that it does not tell me where this error is so that I can further troubleshoot it. Where can I type -v in order to "see the invocation" and troubleshoot further? Without this, there is absolute no way to figure out the problem. Thanks in advance.

Answer

yndolok picture yndolok · Apr 22, 2015

Here's how I was able to find out what the problem was:

  1. Click on the issue in the issue navigator (⌘ + 4, then click on the line with the red ! at the start)
  2. At the bottom of the file that appears, there should be a line that says something like:

1. While emitting IR SIL function @_TToZFC4Down8Resource12getInstancesfMS0_U__FTSS6paramsGVSs10DictionarySSPSs9AnyObject__9onSuccessGSqFGSaQ__T__7onErrorGSqFT5errorCSo7NSError8responseGSqCSo17NSHTTPURLResponse__T___T_ for 'getInstances' at /path/to/file.swift:112:5

  1. The location where your error occurred is at the end of that line. (In this case, on line 112 of file.swift in getInstances).