调试合并 .swiftmodule:分段错误:11

Debug merge .swiftmodule: segmentation fault: 11

我正在尝试使用 XCode v. 6.3 (6D520o) 编译 Swift 1.2 iOS 项目。 它通过 "Compile Swift source files" 和

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

并在 "Merge Project.swiftmodule" 上崩溃。

Clang 的堆栈跟踪:

0  swift                    0x000000010ffa8d38 llvm::sys::PrintStackTrace(__sFILE*) + 40
1  swift                    0x000000010ffa9214 SignalHandler(int) + 452
2  libsystem_platform.dylib 0x00007fff84503f1a _sigtramp + 26
3  libsystem_c.dylib        0x00007fff91d6076c sprintf_l + 134
4  swift                    0x000000011065a502 swift::getFullComment(swift::CommentContext&, swift::Decl const*) + 34
5  swift                    0x000000010fba0e5a (anonymous namespace)::ObjCPrinter::printAbstractFunction(swift::AbstractFunctionDecl*, bool, bool) + 58
6  swift                    0x000000010fba03ce (anonymous namespace)::ObjCPrinter::visitVarDecl(swift::VarDecl*) + 126
7  swift                    0x000000010fba55c1 (anonymous namespace)::ObjCPrinter::printMembers(swift::IteratorRange<swift::DeclIterator>) + 433
8  swift                    0x000000010fba0202 swift::ASTVisitor<(anonymous namespace)::ObjCPrinter, void, void, void, void, void, void>::visit(swift::Decl*) + 3266
9  swift                    0x000000010fb9e45c swift::printAsObjC(llvm::raw_ostream&, swift::Module*, llvm::StringRef, swift::Accessibility) + 2876
10 swift                    0x000000010f8a1bcc printAsObjC(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, swift::Module*, llvm::StringRef, bool) + 332
11 swift                    0x000000010f8a04b5 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 4901
12 swift                    0x000000010f89efe6 main + 1814
13 libdyld.dylib            0x00007fff8f6ca5c9 start + 1

这里是 full output of Compile and Merge phases

是否可以从clang输出中找到真正的崩溃原因? 或者我必须删除代码直到它再次工作?

private 添加到静态变量解决了问题:

private static var taskId = 0

...