I was trying to create a generic collection, PowerCollection, such that e.g. PowerCollection([0,1], 2) would contain [0, 0], [0, 1], [1, 0], and [1, 1], but I ran into trouble. Even with all method implementations stubbed out, the compiler is segfaulting and I don't know why.
Here is a minimal example that causes the segfault. Am I doing something wrong here?
I am using: Xcode 12.3 (17715) (Build 12C33) on macOS Version 10.15.7 (Build 19H2)
struct PowerCollection<C : Collection> : Collection {
typealias Index = [C.Index]
typealias Element = [C.Element]
var startIndex, endIndex: Index
subscript(position: Index) -> [C.Element] {
return []
}
func index(after i: Index) -> Index {
return i
}
}
extension Array : Comparable where Element : Comparable {
public static func < (lhs: [Element], rhs: [Element]) -> Bool {
return false
}
}
Trying to compile the above gave me a compiler segfault with the following stack dump
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c -primary-file /Users/justinh/Desktop/CrashInvestigation/CrashInvestigation/main.swift -emit-module-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main~partial.swiftmodule -emit-module-doc-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main~partial.swiftdoc -emit-module-source-info-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main~partial.swiftsourceinfo -serialize-diagnostics-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main.dia -emit-dependencies-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main.d -emit-reference-dependencies-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main.swiftdeps -target x86_64-apple-macos11.0 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -I /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Products/Debug -F /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Products/Debug -enable-testing -g -module-cache-path /Users/justinh/Library/Developer/Xcode/DerivedData/ModuleCache.noindex -swift-version 5 -enforce-exclusivity=checked -Onone -D DEBUG -serialize-debugging-options -Xcc -working-directory -Xcc /Users/justinh/Desktop/CrashInvestigation -enable-anonymous-context-mangled-names -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/CrashInvestigation-generated-files.hmap -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/CrashInvestigation-own-target-headers.hmap -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/CrashInvestigation-all-target-headers.hmap -Xcc -iquote -Xcc /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/CrashInvestigation-project-headers.hmap -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Products/Debug/include -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/DerivedSources-normal/x86_64 -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/DerivedSources/x86_64 -Xcc -I/Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/DerivedSources -Xcc -DDEBUG=1 -target-sdk-version 11.1 -module-name CrashInvestigation -o /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Build/Intermediates.noindex/CrashInvestigation.build/Debug/CrashInvestigation.build/Objects-normal/x86_64/main.o -index-store-path /Users/justinh/Library/Developer/Xcode/DerivedData/CrashInvestigation-hgzhbvtdchhupjellxarahpklfll/Index/DataStore -index-system-modules
1. Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
2. While evaluating request IRGenSourceFileRequest(IR Generation for file "/Users/justinh/Desktop/CrashInvestigation/CrashInvestigation/main.swift")
3. While emitting IR SIL function "#$s18CrashInvestigation15PowerCollectionVyxGSlAASl20_failEarlyRangeCheck_6boundsySny5IndexQzG_AItFTW".
for '_failEarlyRangeCheck(_:bounds:)' (in module 'Swift')
4. While mangling type for debugger type 'Range<Array<τ_0_0.Index>>'
0 swift 0x000000011288f615 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1 swift 0x000000011288e615 llvm::sys::RunSignalHandlers() + 85
2 swift 0x000000011288fbcf SignalHandler(int) + 111
3 libsystem_platform.dylib 0x00007fff6fddd5fd _sigtramp + 29
4 libsystem_platform.dylib 0x00007faafe8397c0 _sigtramp + 18446743711030559200
5 swift 0x000000010f69e03f swift::GenericSignatureImpl::getConformanceAccessPath(swift::Type, swift::ProtocolDecl*) + 31
6 swift 0x000000010f598069 swift::Mangle::ASTMangler::appendAnyProtocolConformance(swift::CanGenericSignature, swift::CanType, swift::ProtocolConformanceRef) + 217
7 swift 0x000000010f596386 swift::Mangle::ASTMangler::appendConcreteProtocolConformance(swift::ProtocolConformance const*) + 2070
8 swift 0x000000010f594aa3 swift::Mangle::ASTMangler::appendRetroactiveConformances(swift::SubstitutionMap, swift::ModuleDecl*) + 179
9 swift 0x000000010f58de5e swift::Mangle::ASTMangler::appendType(swift::Type, swift::ValueDecl const*) + 3454
10 swift 0x000000010f591af8 swift::Mangle::ASTMangler::mangleTypeForDebugger(swift::Type, swift::DeclContext const*) + 632
11 swift 0x000000010e7c9d21 (anonymous namespace)::IRGenDebugInfoImpl::getOrCreateType(swift::irgen::DebugTypeInfo) + 1505
12 swift 0x000000010e7cb8e5 (anonymous namespace)::IRGenDebugInfoImpl::createParameterTypes(swift::CanTypeWrapper<swift::SILFunctionType>) + 1461
13 swift 0x000000010e7c2af4 (anonymous namespace)::IRGenDebugInfoImpl::emitFunction(swift::SILDebugScope const*, llvm::Function*, swift::SILFunctionTypeRepresentation, swift::SILType, swift::DeclContext*) + 2868
14 swift 0x000000010e7e245f swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 2639
15 swift 0x000000010e67d3a7 swift::irgen::IRGenerator::emitLazyDefinitions() + 1207
16 swift 0x000000010e7b8d20 performIRGeneration(swift::IRGenOptions const&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::StringRef, swift::SourceFile*, llvm::GlobalVariable**, llvm::StringSet<llvm::MallocAllocator>*) + 1920
17 swift 0x000000010e7e1781 swift::SimpleRequest<swift::IRGenSourceFileRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::IRGenSourceFileRequest const&, swift::Evaluator&) + 97
18 swift 0x000000010e7bd04c llvm::Expected<swift::IRGenSourceFileRequest::OutputType> swift::Evaluator::getResultUncached<swift::IRGenSourceFileRequest>(swift::IRGenSourceFileRequest const&) + 940
19 swift 0x000000010e7b929d swift::performIRGeneration(swift::IRGenOptions const&, swift::SourceFile&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::GlobalVariable**, llvm::StringSet<llvm::MallocAllocator>*) + 269
20 swift 0x000000010e4031ba performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 3002
21 swift 0x000000010e3f2d97 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 20695
22 swift 0x000000010e373c27 main + 1255
23 libdyld.dylib 0x00007fff6fbe4cc9 start + 1
24 libdyld.dylib 0x000000000000004b start + 18446603338641421187
error: Segmentation fault: 11 (in target 'CrashInvestigation' from project 'CrashInvestigation')
Related
I have a small swift script
#!/usr/bin/swift
import Foundation
let url = URL(fileURLWithPath: ".", isDirectory: true)
print(url.absoluteString)
If I run it from command line I am getting a Segmentation fault
swift-test $ ./url-test.swift
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret ./url-test.swift -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -color-diagnostics -module-name main
1. Apple Swift version 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51)
2. While running user code "./url-test.swift"
0 swift 0x0000000113fa74ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x0000000113fa6cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff724cf5fd _sigtramp + 29
3 libsystem_malloc.dylib 0x00007fff7248e0c6 szone_malloc_should_clear + 66
4 swift 0x000000010fd2a48a llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) + 458
5 swift 0x000000010fd314fb llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, char const* const*) + 2011
6 swift 0x000000010fd065ba performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 14362
7 swift 0x000000010fcfaf75 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55813
8 swift 0x000000010fc70f53 main + 1283
9 libdyld.dylib 0x00007fff722d6cc9 start + 1
10 libdyld.dylib 0x000000000000000b start + 2379387715
Segmentation fault: 11
If I run it inside swift interpreter everything is fine
swift-test $ swift
Welcome to Apple Swift version 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51).
Type :help for assistance.
1> import Foundation
2. let url = URL(fileURLWithPath: ".", isDirectory: true)
3. print(url.absoluteString)
file:///Users/user/projects/swift-test/
url: URL = {}
4>
Any thoughts how to fix segmentation fault?
I have a very simple script written in swift and running this with swift file.swift
import Foundation
let url = URL(string: "www.google.com")
and this gives me a segfault error with this message
Stack dump:
0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -interpret file.swift -enable-objc-interop -stack-check -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -color-diagnostics -module-name file
1. Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
2. While running user code "file.swift"
0 swift 0x00000001101354ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x0000000110134cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff6c0aa5fd _sigtramp + 29
3 libsystem_platform.dylib 0x00007ffee3e196a8 _sigtramp + 2010575048
4 swift 0x000000010beb89ba llvm::MCJIT::runFunction(llvm::Function*, llvm::ArrayRef<llvm::GenericValue>) + 458
5 swift 0x000000010bebfa2b llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, char const* const*) + 2011
6 swift 0x000000010be94aea performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 14362
7 swift 0x000000010be894a5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 55813
8 swift 0x000000010bdff4d3 main + 1283
9 libdyld.dylib 0x00007fff6beb1cc9 start + 1
zsh: segmentation fault swift file.swift
any ideas as to where the problem is? Thanks!
EDIT: I have tried putting the code to Xcode and it works as it should.
I had a script which was working and suddenly stopped. Exactly on the line where I have created an URL. It was working on Xcode but not from terminal.
Looks like, it is bug.
If you first compile by using swiftc then run it, it is working.
I have found the answer in the following page:
https://blog.kulman.sk/workaround-for-swift-scripts-crash/
I have an Obj-C class extending NSObject. One of its properties is an NS_ENUM; let's call it direction.
Then I have a Swift class with an optional property of this Obj-C class; let's call that message.
The following example code is fine:
switch message?.direction
{
case .Inbound:
...
case .OutBound:
...
case nil:
...
}
However, if I then introduce:
guard let message = self.message else { return }
and remove the ? in the code above, the compiler crashes; see below.
It seems to get confused by case nil:, because the crash disappears if I delete it; it's of course no longer needed.
Just curious, has anyone seen this Swift compiler crash?
1. Apple Swift version 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29)
2. While emitting IR SIL function "#$s7SomeFunction...".
for 'update()' (at /Users/.../SomeFile.swift:83:11)
0 swift 0x00000001133554ea PrintStackTraceSignalHandler(void*) + 42
1 swift 0x0000000113354cc0 SignalHandler(int) + 352
2 libsystem_platform.dylib 0x00007fff6b8d75fd _sigtramp + 29
3 swift 0x000000010f1aaa4c (anonymous namespace)::SinglePayloadEnumImplStrategy::consume(swift::irgen::IRGenFunction&, swift::irgen::Explosion&, swift::irgen::Atomicity) const + 1244
4 swift 0x00000001131d082c llvm::IRBuilderBase::CreateLifetimeEnd(llvm::Value*, llvm::ConstantInt*) + 28
5 swift 0x000000010f2105a1 swift::irgen::FixedTypeInfo::deallocateStack(swift::irgen::IRGenFunction&, swift::irgen::StackAddress, swift::SILType) const + 81
6 swift 0x000000010f2e8244 swift::SILInstructionVisitor<(anonymous namespace)::IRGenSILFunction, void>::visit(swift::SILInstruction*) + 33828
7 swift 0x000000010f2dc8e3 swift::irgen::IRGenModule::emitSILFunction(swift::SILFunction*) + 8835
8 swift 0x000000010f190032 swift::irgen::IRGenerator::emitGlobalTopLevel() + 1410
9 swift 0x000000010f2baed9 performIRGeneration(swift::IRGenOptions&, swift::ModuleDecl*, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::LLVMContext&, swift::SourceFile*, llvm::GlobalVariable**) + 1097
10 swift 0x000000010f0b236f performCompileStepsPostSILGen(swift::CompilerInstance&, swift::CompilerInvocation&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, bool, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, bool, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 4255
11 swift 0x000000010f0a77c0 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 48416
12 swift 0x000000010f01f4d3 main + 1283
13 libdyld.dylib 0x00007fff6b6decc9 start + 1
error: Segmentation fault: 11 (in target 'SomeApp' from project 'SomeApp')
MacOS: 10.14.6 - Xcode: Version 11.3.1 (11C504)
I create a demo project in github. if anyone can help me, you can check it
https://github.com/philCc/URLNavigatorExt.git branch:Segmentation_fault_11
1. While running pass #153921 SILFunctionTransform "DCE" on SILFunction "#$s23URLNavigatorExt_Example6RouterO9PRWebviewV8instance2byAESgSDyS2SG_tFZ".
for 'instance(by:)' (at /Users/phil/Documents/WorkSpace/ky_tech/URLNavigatorExt/Example/URLNavigatorExt/generated/Router.generated.swift:989:20)
0 swift 0x000000010e1cca63 PrintStackTraceSignalHandler(void*) + 51
1 swift 0x000000010e1cc236 SignalHandler(int) + 358
2 libsystem_platform.dylib 0x00007fff5b7bfb5d _sigtramp + 29
3 libsystem_platform.dylib 0x000000010f830600 _sigtramp + 3020360384
4 swift 0x000000010a53a370 (anonymous namespace)::DCE::markControllingTerminatorsLive(swift::SILBasicBlock*) + 800
5 swift 0x000000010a539ca2 (anonymous namespace)::DCE::markValueLive(swift::SILNode*) + 466
6 swift 0x000000010a5375e8 (anonymous namespace)::DCE::run() + 2728
7 swift 0x000000010a4bef3e swift::SILPassManager::execute() + 4606
8 swift 0x000000010a11d96b swift::CompilerInstance::performSILProcessing(swift::SILModule*, swift::UnifiedStatsReporter*) + 6379
9 swift 0x0000000109e15ec5 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 33925
10 swift 0x0000000109e0a234 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 6820
11 swift 0x0000000109d97733 main + 1219
12 libdyld.dylib 0x00007fff5b5d43d5 start + 1
13 libdyld.dylib 0x0000000000000056 start + 2762128514
error: Segmentation fault: 11 (in target 'URLNavigatorExt_Example' from project 'URLNavigatorExt')
if change the line: 993
then archive will be successful
var _url: String?
// to
var _url: String? = ""
// or
var _url: String? = dict["url"]
I am using Ray Wenderlich's Storyboard tutorial part 1 to learn how to use storyboards, and I'm doing it in Swift. So I'm transferring the following code, which is located in the AppDelegate.swift file, from
UITabBarController *tabBarController = (UITabBarController *)self.window.rootViewController;
UINavigationController *navigationController = [tabBarController viewControllers][0];
PlayersViewController *playersViewController = [navigationController viewControllers][0];
playersViewController.players = _players;
to
let tabBarController : UITabBarController = self.window?.rootViewController as UITabBarController
let navBarController = tabBarController.viewControllers[0] as UINavigationController
let playersController = navBarController.viewControllers[0]
playersController.players = self.players
However, the latter section of code throws a compiler error because when I declare playersController I'm not downcasting the AnyObject that is returned by navBarController.viewControllers[0] to my custom PlayersTableViewController class. So I do that with the following code
let playersController = navBarController.viewControllers[0] as PlayersTableViewController
But this causes the SourceKitService Xcode 6 bug to be appear, and I lose all syntax highlighting.
So I'm left with either continuing with no syntax highlighting, or not continue at all because playersController needs to be recognized as a PlayersTableViewController in order to access the players property. I've narrowed it down to that downcast operation that causes Xcode to bug out, does anyone have any solutions to this problem?
EDIT: I tried to go ahead without syntax coloring, write the necessary code, and then compile it, but it threw the following messy compiler error.
0 swift 0x0000000109fed688 llvm::sys::PrintStackTrace(__sFILE*) + 40
1 swift 0x0000000109fedb74 SignalHandler(int) + 452
2 libsystem_platform.dylib 0x00007fff8f55b5aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1890208368
4 swift 0x00000001094b8dab (anonymous namespace)::RValueEmitter::emitForceValue(swift::SILLocation, swift::Expr*, unsigned int, swift::Lowering::SGFContext) + 1291
5 swift 0x00000001094ace5f swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 4111
6 swift 0x00000001094b436d swift::Lowering::SILGenFunction::emitRValueAsSingleValue(swift::Expr*, swift::Lowering::SGFContext) + 45
7 swift 0x00000001094cb903 swift::Lowering::SILGenFunction::emitRValueAsOrig(swift::Expr*, swift::Lowering::AbstractionPattern, swift::Lowering::TypeLowering const&, swift::Lowering::SGFContext) + 179
8 swift 0x000000010949f496 (anonymous namespace)::CheckedCastEmitter::emitOperand(swift::Expr*) + 150
9 swift 0x00000001094b6350 emitUnconditionalCheckedCast(swift::Lowering::SILGenFunction&, swift::SILLocation, swift::Expr*, swift::Type, swift::CheckedCastKind, swift::Lowering::SGFContext) + 288
10 swift 0x00000001094ae40d swift::ASTVisitor<(anonymous namespace)::RValueEmitter, swift::Lowering::RValue, void, void, void, void, void, swift::Lowering::SGFContext>::visit(swift::Expr*, swift::Lowering::SGFContext) + 9661
11 swift 0x000000010949caeb swift::Lowering::SILGenFunction::emitExprInto(swift::Expr*, swift::Lowering::Initialization*) + 219
12 swift 0x000000010949397e swift::Lowering::SILGenFunction::visitPatternBindingDecl(swift::PatternBindingDecl*) + 190
13 swift 0x00000001094cfd4c swift::Lowering::SILGenFunction::visitBraceStmt(swift::BraceStmt*) + 332
14 swift 0x00000001094d2c54 swift::ASTVisitor<swift::Lowering::SILGenFunction, void, void, void, void, void, void>::visit(swift::Stmt*) + 148
15 swift 0x00000001094a0f93 swift::Lowering::SILGenFunction::emitFunction(swift::FuncDecl*) + 243
16 swift 0x0000000109482096 swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 230
17 swift 0x000000010949bd83 swift::ASTVisitor<SILGenType, void, void, void, void, void, void>::visit(swift::Decl*) + 355
18 swift 0x000000010949a70b SILGenType::emitType() + 203
19 swift 0x00000001094956de swift::Lowering::SILGenModule::visitNominalTypeDecl(swift::NominalTypeDecl*) + 30
20 swift 0x000000010948400b swift::Lowering::SILGenModule::emitSourceFile(swift::SourceFile*, unsigned int) + 411
21 swift 0x000000010948428c swift::SILModule::constructSIL(swift::Module*, swift::SourceFile*, unsigned int) + 268
22 swift 0x0000000109484390 swift::performSILGeneration(swift::SourceFile&, unsigned int) + 32
23 swift 0x00000001093751a7 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 3255
24 swift 0x000000010937448d main + 1645
25 libdyld.dylib 0x00007fff9a2fd5fd start + 1
26 libdyld.dylib 0x0000000000000039 start + 1708141117
Stack dump:
0. Program arguments: /Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -c /Users/alex/Desktop/CodingFolder/iOS/Ratings/Ratings/Player.swift /Users/alex/Desktop/CodingFolder/iOS/Ratings/Ratings/ViewController.swift -primary-file /Users/alex/Desktop/CodingFolder/iOS/Ratings/Ratings/AppDelegate.swift /Users/alex/Desktop/CodingFolder/iOS/Ratings/Ratings/PlayersTableViewController.swift -enable-objc-attr-requires-objc-module -target i386-apple-ios7.1 -module-name Ratings -sdk /Applications/Xcode6-Beta4.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -I /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Products/Debug-iphonesimulator -F /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Products/Debug-iphonesimulator -g -module-cache-path /Users/alex/Library/Developer/Xcode/DerivedData/ModuleCache -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Ratings-generated-files.hmap -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Ratings-own-target-headers.hmap -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Ratings-all-target-headers.hmap -Xcc -iquote -Xcc /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Ratings-project-headers.hmap -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Products/Debug-iphonesimulator/include -Xcc -I/Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/DerivedSources/i386 -Xcc -I/Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/DerivedSources -Xcc -DDEBUG=1 -emit-module-doc-path /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Objects-normal/i386/AppDelegate~partial.swiftdoc -O0 -emit-module-path /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Objects-normal/i386/AppDelegate~partial.swiftmodule -serialize-diagnostics-path /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Objects-normal/i386/AppDelegate.dia -emit-dependencies-path /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Objects-normal/i386/AppDelegate.d -o /Users/alex/Library/Developer/Xcode/DerivedData/Ratings-cylggjacqbkxbeeotoghnkluxwly/Build/Intermediates/Ratings.build/Debug-iphonesimulator/Ratings.build/Objects-normal/i386/AppDelegate.o
1. While emitting SIL for 'application' at /Users/alex/Desktop/CodingFolder/iOS/Ratings/Ratings/AppDelegate.swift:18:5
<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)
Command /Applications/Xcode6-Beta4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift failed with exit code 254