Xcode 6上的Swift编译器错误

问题描述:

我在Swift Compiler中遇到问题: 我在最新的Xcode 6上为iOs创建了新项目,并试图构建 - 通过ViewController.swift和AppDelegate.swift收到2个错误。Xcode 6上的Swift编译器错误

<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) 
<unknown>:0: error: unable to execute command: Bus error: 10 
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation) 

如果需要,我可以发布完整日志。

我该怎么办?谢谢。

+2

即使输入错误,编译器也不应该崩溃。向Apple发送错误报告。 – 2014-09-22 12:30:06

+0

我不太了解swift或你的代码(所以我不知道它们是否重复),但是如果你搜索'Swift segmentation fault 11',那么就有3 *个其他类似的问题,并且至少有一个其中的一个答案显示触发故障的语法错误。 (http://*.com/questions/24222644/swift-compiler-segmentation-fault-when-building) – 2015-01-20 12:35:36

我在使用swift项目时遇到过类似的问题。我在Apple支持网站上找到了this。它表示,当您尝试访问不存在/不可访问的内存地址时,会发生此类错误。要解决此问题,您可以退出未使用的应用程序,甚至重新启动可能对您有帮助的mac。