Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Abort Trap: 6 error in the new Swift 3.1/Xcode 8.3

I have a finished project with about 30vcs, Firebase, Googlemaps integration, etc - ie a really big complicated project, it is a geolocation based game that I've finally finished after several months of work.

Worked and compiled just fine, until I tried to compile it in the new Swift 3.1/ Xcode 8.3.

After changing the recommended syntax on a few lines to clear the new XCODE 8.3 errors, compiling fails with "Abort Trap: 6" error.

This is the last few lines of the debugger (prior to that theres about 100 lines of incomprehensible file names/numbers etc).

0 swift 0x00000001089f1eb7 PrintStackTraceSignalHandler(void*) + 39 1 swift
0x00000001089f1366 SignalHandler(int) + 646 2 libsystem_platform.dylib 0x00007fffc602eb3a _sigtramp + 26 3 libsystem_platform.dylib 0x0000000100000001 _sigtramp + 972887265 4 libsystem_c.dylib 0x00007fffc5eb3420 abort + 129 5 swift
0x0000000106454644 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt, llvm::Optional) + 38404 6 swift
0x00000001064564fa swift::ModuleFile::getType(llvm::PointerEmbeddedInt) + 2106 7 swift 0x000000010644f373 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt, llvm::Optional) + 17203 8 swift
0x0000000106459f24 swift::ModuleFile::maybeReadPattern(swift::DeclContext*) + 740 9 swift 0x000000010644f605 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt, llvm::Optional) + 17861 10 swift
0x00000001064607c8 swift::ModuleFile::loadAllMembers(swift::Decl*, unsigned long long) + 600 11 swift
0x0000000106840f0d swift::NominalTypeDecl::getMembers() const + 125 12 swift 0x0000000106828c75 (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 869 13 swift 0x0000000106826645 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 277 14 swift
0x000000010619a75f swift::SILPassManager::SILPassManager(swift::SILModule*, llvm::StringRef) + 1471 15 swift 0x00000001061a135f swift::runSILDiagnosticPasses(swift::SILModule&) + 159 16 swift
0x0000000105811282 swift::performFrontend(llvm::ArrayRef, char const*, void*, swift::FrontendObserver*) + 42866 17 swift
0x00000001057c088c main + 9052 18 libdyld.dylib
0x00007fffc5e1f235 start + 1 Stack dump:

(here is about 150 lines of incomprehensible debugging numbers/files/alphanumericals - followed by this in the end):

  1. While loading members for 'homePage' in module 'googleMapsPractice'
    1. While deserializing PatternBindingDecl #295in 'googleMapsPractice'
    2. While deserializing 'gameDBRef' (VarDecl #296)in 'googleMapsPractice'
    3. While deserializing decl #1009 (XREF)in 'googleMapsPractice'
    4. Cross-reference to module 'FirebaseDatabase' ... FIRDatabaseReference

I am really stuck as I don't know where to look to debug this.

'homePage.swift' is the set-up page VC of the game, and is the only VC referenced in the debugger, is there any common solutions to Abort Trap 6 errors that I could try weed out on this VC? It is probably 2000 lines of code and i'm not even sure the problem lies in that VC as the debugger is so vague.

Any help would be greatly appreciated

like image 526
Apneist Avatar asked Apr 01 '17 00:04

Apneist


1 Answers

This happened to me because I had a private enum in both the main class, and an extension of that class. Both of these were in the same file. Tricky one!

like image 147
dylanslewis Avatar answered Sep 30 '22 20:09

dylanslewis