I got error abort trap 6 after I update xcode 9.3 to 10.1

The message contains invalid characters.

As the title mentioned, I got 'error abort trap 6' after I update xcode 9.3 to 10.1 then compile the Project. The Detail report is in the file.txt.

I had upgraded my code from swift3.0 to swift 4.2, and got the error again.

What's wrong with that?

<unknown>:0: error: fatal error encountered while reading from module 'MyProject'; 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(coder:)' in parent class

0 swift PrintStackTraceSignalHandler(void*)

1 swift SignalHandler(int)

2 libsystem_platform.dylib _sigtramp

3 libsystem_platform.dylib _sigtramp

4 libsystem_c.dylib abort

5 swift swift::ModuleFile::fatal(llvm::Error)

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

7 swift swift::SILDeserializer::readSILInstruction(swift::SILFunction*, swift::SILBasicBlock*, swift::SILBuilder&, unsigned int, llvm::SmallVectorImpl<unsigned long long>&)

8 swift swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool)

9 swift swift::SILDeserializer::getAllSILFunctions()

10 swift swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*)

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

12 swift swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*)

swift main

14 libdyld.dylib start

15 libdyld.dylib start

Stack dump:

0...........

1. Contents of /var/folders/f8/qkq2hfg56d34pk7h2x3glr2w0000gn/T/inputs-3fca68:

---

/Users/mio/Library/Developer/Xcode/DerivedData/MyProject-fjgcaxggxgwmqichaqxbgwtpidlc/Build/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/InputHeaper_View~partial.swiftmodule

****same errors alot****

/Users/mio/Library/Developer/Xcode/DerivedData/MyProject-fjgcaxggxgwmqichaqxbgwtpidlc/Build/Intermediates.noindex/MyProject.build/Debug-iphonesimulator/MyProject.build/Objects-normal/x86_64/EditBtnView~partial.swiftmodule

---

2. While deserializing SIL function "$S10MyProject28Record_SearchSelectTagButtonC5coderACSgSo7NSCoderC_tcfC"

error: Abort trap: 6

This indicates that the Swift compiler itself has crashed. That should never happen, and so this is most definitely bugworthy.

Please post your bug number, just for the record.

IMPORTANT In cases like this you should always file a bug, but it really helps if you can include a project that reproduces the problem. Ideally this project would be as small as possible. One option here is to make a copy of your main project and then rip stuff out until the compiler stops crashing. This helps in two ways. First, you get your test project for the bug report. Second, this process helps you uncover what triggers the crash, and you can use that to avoid it.

With regards this last point, the log you posted contains this line:

2. While deserializing SIL function "$S10MyProject28Record_SearchSelectTagButtonC5coderACSgSo7NSCoderC_tcfC"

indicating that the crash is probably related to the referenced function. The function’s name has been mangled, but you can still pull clues from it:

  • The module name is

    MyProject
  • The start of the function name is

    Record_SearchSelectTagButton

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I doubt that could be enough in your case, but did you do a Clean Build Folder ?

did you do a Clean Build Folder ?

Yeah, that’s great advice. I make the mistake of assuming that folks know this, but that’s not always the case )-:

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Sorry for late.

(obviously 'clean build folder' made no sense)

We chosed a special way to solve the problem, we created a new Project and the name of the Proeject was modified. Then the project build successed.

But if the name is same to the old one 'MyProject', then we would get 'abort trap 6'


the error mentioned Record_SearchSelectTagButton class is a normal button. And when I deleted that class, another error of another view would appear.



class Record_SearchSelectTagButton: UIButton {

override var isSelected: Bool {

didSet {

if isSelected {

self.backgroundColor = MAIN_COLOR

} else {

self.backgroundColor = .white

}

}

}

override init(frame: CGRect) {

super.init(frame: frame)

setTitleColor(COLOR_6, for: .normal)

setTitleColor(.white, for: .selected)

titleLabel?.font = UIFont.systemFont(ofSize: 15)

layer.borderWidth = 0.5

layer.borderColor = COLOR_220.cgColor

layer.cornerRadius = 3.0

}

required init?(coder aDecoder: NSCoder) {

fatalError("init(coder:) has not been implemented")

}

}

I would not want to propose you something that obviously makes no sense. But you will certainly find the answer by yourself 😉

Hi, I got "Abort trap: 6" error using Xcode 12.5.1

I know this is a bit late, but here it is.... I managed to narrow it down to a single line of code:

guard let scnNode = scnNode else { return nil }

I'm using "guard let" wrong, but this was the culprit.

Problem: Abort Trap (In my case my code is working perfectly but when I trying to make an Archive for upload app on testFlight file I got the "Abort Trap")

Solution:- Just Select Your Project from project Navegater (most Left Pane) Select Project > Select Targets > Build Settings > Swift Compiler - Code Genration > Optimization Level > Debug and Realease make "No Optimization [-Onone]"

I got error abort trap 6 after I update xcode 9.3 to 10.1
 
 
Q