19 Replies
      Latest reply on Apr 18, 2019 7:17 AM by FunkyMusic
      breakeven Level 1 Level 1 (0 points)

        Occasionally, I get this error and I tried to research it but I couldnt figure out how to solve it. It says:

         

        1. While deserializing SIL vtable for 'PostTextCVC' in module 'Appp'
        error: Abort trap: 6

        The only way to dismiss this is to user another simulator or my actual phone. I don't know how to fix it for real though, don't even know what that error means. It's not exactly descriptive. Any suggestions?

         

        PS: Xcode version 10.0. beta 5

        • Re: Xcode error: Abort Trap 6
          jonprescott Level 2 Level 2 (70 points)

          I've seen this abort as the result of an unhandled C++ exception.  Since you seem to playing around with parts of Swift, parts of which are written in C++ (the SIL support specifically), it looks like you've tripped over an unhandled exception.  Note that this is based on my experience building software with C++ on Mac platforms.

            • Re: Xcode error: Abort Trap 6
              breakeven Level 1 Level 1 (0 points)

              The only thing I deal with is Swift, not C++. Tbh, I have no clue what this error means. It comes and goes occassionally. I have to clean the project, switch to another simulator or switch from the Xcode 10 Beta stable Xcode version to the current stable version of Xcode. I'm just lost with this error.

            • Re: Xcode error: Abort Trap 6
              eskimo Apple Staff Apple Staff (11,025 points)

              Are you seeing this message while building your app?  Or while running it on the device / simulator?

              Share and Enjoy

              Quinn “The Eskimo!”
              Apple Developer Relations, Developer Technical Support, Core OS/Hardware
              let myEmail = "eskimo" + "1" + "@apple.com"

                • Re: Xcode error: Abort Trap 6
                  Axlprince Level 1 Level 1 (0 points)

                  I'm seeing this message while building my app and when I try to run on device or simulator. With Xcode 10 beta 5 worked perfectly.

                    • Re: Xcode error: Abort Trap 6
                      eskimo Apple Staff Apple Staff (11,025 points)

                      I'm seeing this message while building my app and when I try to run on device or simulator.

                      I’m sorry that my question wasn’t more clear.  What I need to know is whether you see this during the build of your app?  Or whether you see it at runtime?  A good diagnostic test is as follows:

                      1. Open your project and select the appropriate scheme.

                      2. Choose Product > Build.  Do you see the error?  If you do, stop now.

                      3. If not, choose Product > Perform Action > Run Without Building.  Do you see the error now?

                      Share and Enjoy

                      Quinn “The Eskimo!”
                      Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                      let myEmail = "eskimo" + "1" + "@apple.com"

                        • Re: Xcode error: Abort Trap 6
                          EdwardSun Level 1 Level 1 (0 points)
                          I had run with out build.

                          Actually it didn't work.

                          I've tried many ways, but I haven't solved them.

                           

                          My error is here:

                          <unknown>:0: error: fatal error encountered while reading from module 'portfolio'; please file a bug report with your project and the crash log

                           

                          *** DESERIALIZATION FAILURE (please include this section in any bug report) ***

                          could not find 'init(frame:)' in parent class

                          0  swift                    0x000000010e14064a PrintStackTraceSignalHandler(void*) + 42

                          1  swift                    0x000000010e13fdfe SignalHandler(int) + 302

                          2  libsystem_platform.dylib 0x00007fff6cd5ef5a _sigtramp + 26

                          3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2469007552

                          4  libsystem_c.dylib        0x00007fff6cafc1ae abort + 127

                          5  swift                    0x000000010b5a60fb swift::ModuleFile::fatal(llvm::Error) + 1915

                          6  swift                    0x000000010b5dd753 getSILDeclRef(swift::ModuleFile*, llvm::ArrayRef<unsigned long long>, unsigned int&) + 307

                          7  swift                    0x000000010b5dfa94 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 740

                          8  swift                    0x000000010b68684b swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 331

                          9  swift                    0x000000010a3d09be performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34558

                          10 swift                    0x000000010a3c4dc5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717

                          11 swift                    0x000000010a36aa35 main + 1349

                          12 libdyld.dylib            0x00007fff6ca50015 start + 1

                          13 libdyld.dylib            0x00000000000000c0 start + 2472214700

                           

                          Stack dump:

                           

                          0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -merge-modules -emit-module -filelist /var/folders/r2/qhm84y4535bbnf292567t6b00000gn/T/...

                           

                          1. Contents of /var/folders/r2/qhm84y4535bbnf292567t6b00000gn/T/inputs-f26b66:

                          ---

                          /Users/edward/Library/Developer/Xcode/DerivedData/portfolio-bfuzuwxeicpcrpcpnoeylnrzpptb/Build/Intermediates.noindex/portfolio.build/Debug-iphonesimulator/portfolio.build/Objects-normal/x86_64/OKRangeFilter~partial.swiftmodule

                           

                          .......

                           

                          2. While deserializing SIL vtable for 'BackgroundHighLightUIControl' in module 'portfolio'

                           

                           

                          error: Abort trap: 6

                          • Re: Xcode error: Abort Trap 6
                            FunkyMusic Level 1 Level 1 (0 points)

                            I have the same issue, when trying to build my App. I converted the project from Swift 3 to 4.2. All submodules to build only my project failes.

                             

                            ---
                            0  swift                    0x0000000104bb8bf5 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
                            1  swift                    0x0000000104bb7e95 llvm::sys::RunSignalHandlers() + 85
                            2  swift                    0x0000000104bb91e2 SignalHandler(int) + 258
                            3  libsystem_platform.dylib 0x00007fff744d3b3d _sigtramp + 29
                            4  libsystem_platform.dylib 0x0000000000000001 _sigtramp + 2343748833
                            5  libsystem_c.dylib        0x00007fff743911c9 abort + 127
                            6  swift                    0x0000000100feebbb swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)::$_1::__invoke(void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) + 523
                            7  swift                    0x0000000104b4f47b llvm::report_fatal_error(llvm::Twine const&, bool) + 251
                            8  swift                    0x0000000104b4f37b llvm::report_fatal_error(char const*, bool) + 43
                            9  swift                    0x0000000104afe232 (anonymous namespace)::VerifierLegacyPass::doFinalization(llvm::Module&) + 210
                            10 swift                    0x0000000104a89596 llvm::FPPassManager::doFinalization(llvm::Module&) + 54
                            11 swift                    0x0000000104a88d75 llvm::legacy::FunctionPassManagerImpl::doFinalization(llvm::Module&) + 85
                            12 swift                    0x00000001011386e8 swift::performLLVMOptimizations(swift::IRGenOptions&, llvm::Module*, llvm::TargetMachine*) + 1176
                            13 swift                    0x00000001011393a6 swift::performLLVM(swift::IRGenOptions&, swift::DiagnosticEngine*, llvm::sys::SmartMutex<false>*, llvm::GlobalVariable*, llvm::Module*, llvm::TargetMachine*, swift::version::Version const&, llvm::StringRef, swift::UnifiedStatsReporter*) + 1910
                            14 swift                    0x0000000100fee534 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 16004
                            15 swift                    0x0000000100fe9948 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3000
                            16 swift                    0x0000000100f9b782 main + 690
                            17 libdyld.dylib            0x00007fff742e8ed9 start + 1
                            error: Abort trap: 6
                            
                              • Re: Xcode error: Abort Trap 6
                                FunkyMusic Level 1 Level 1 (0 points)

                                I managed to get rid of the eorror:

                                 

                                Solution 1: go to Build settings an choose compilation mode 'Whole Module' instead of 'Incremental' - I'm not sure if this solution is always a good choice.

                                 

                                Solution 2: When using Xcode 10.2, with Swift 4.2 I got the above error all the time. Go to Swift.org, download latest Swift 4.2.3 Toolchain for Xcode and install it. Go the Menu and select Toolchain 4.2.3 -> voila my issue was got.

                                But now I'm not able to do Swift 5 migration - looks like the the Xcode default toolchain gets used.

                          • Re: Xcode error: Abort Trap 6
                            SaganRitual Level 1 Level 1 (0 points)

                            You seem to be the person on this thread who knows the most. As they say, no good deed goes unpunished. I'm getting an abort trap 6 on my build as well. Specifically:

                             

                            1. Running pass 'Module Verifier' on function '@"$S8DTGenomeAAC10testGenomeyyF"'
                            error: Abort trap: 6

                             

                            I'm trying to build my unit test. My test class is DTGenome, and the only function in it is testGenome().

                             

                            It has been building just fine all day, but it suddenly started choking. At first it was saying the name of one of my protocols. I made a few different random changes to the protocol, like private to public, or changing the name of one of the functions in the protocol, just random stuff. The abort would come and go with some of these changes. I got it to go away, but now it's back. I tried your idea of putting the code into a new project, and that fails too.

                            • Re: Xcode error: Abort Trap 6
                              SaganRitual Level 1 Level 1 (0 points)

                              I've filed a bug report: 48047205. Cheers

                            • Re: Xcode error: Abort Trap 6
                              EdwardSun Level 1 Level 1 (0 points)

                              I have the same problem. Have you got the solution.

                                • Re: Xcode error: Abort Trap 6
                                  eskimo Apple Staff Apple Staff (11,025 points)

                                  Can you respond to the query in my 6 Sep post?

                                  Share and Enjoy

                                  Quinn “The Eskimo!”
                                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                  let myEmail = "eskimo" + "1" + "@apple.com"

                                    • Re: Xcode error: Abort Trap 6
                                      eskimo Apple Staff Apple Staff (11,025 points)

                                      The info you posted on 21 Sep indicates that the Swift compiler is crashing while trying to compile your project.  That should never happen and is always bugworthy.  Please file a bug about this, preferably including a project that reproduces the problem.  I’d appreciate you posting your bug number here, just for the record.

                                      As far as getting your project building is concerned, I have a couple of questions:

                                      • If you create a new project from the built-in templates, does it build?

                                      • If you (temporarily, just for testing) create a new user and log is as that user, is that user able to build your project?

                                      Share and Enjoy

                                      Quinn “The Eskimo!”
                                      Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                      let myEmail = "eskimo" + "1" + "@apple.com"

                                        • Re: Xcode error: Abort Trap 6
                                          EdwardSun Level 1 Level 1 (0 points)

                                          I still haven't solved the problem.

                                           

                                          If I create a new project it build successful.

                                          I think it just heppen on my project. Of course, not only mine, but also those of my workmates.

                                          How can I report my project to you?

                                           

                                          Thanks for your reply

                                    • Re: Xcode error: Abort Trap 6
                                      tasin-mycity4kids Level 1 Level 1 (0 points)

                                      My project was working fine in xcode 9.*, I am using swift 4, In xode 10 it is giving compilation error "Abort Trap 6"

                                      Please find Log below:

                                       

                                      Running pass 'Module Verifier' on function '@"$S10Momspresso16SearchResultCellC05setupD03foryyXl_tFAA09TableViewD0CAdEyyXlSg_tFTV"'

                                      error: Abort trap: 6

                                      • Re: Xcode error: Abort Trap 6
                                        bitsflew Level 1 Level 1 (0 points)

                                        I'm having the same problem

                                         

                                        The compiler crashes with an "Abort trap: 6" while Archiving the project

                                         

                                        However it compiles and runs without any issues on the simulator!

                                         

                                        Config:

                                        Xcode 10 (10A255)

                                        MacOS 10.13.6

                                        • Re: Xcode error: Abort Trap 6
                                          subhadeepal Level 1 Level 1 (0 points)

                                          Facing the same issue. Is this something to do with Xcode 10.* ?

                                          • Re: Xcode error: Abort Trap 6
                                            mariorodriguesSS Level 1 Level 1 (0 points)

                                            Facing the same issue with Xcode 10+