Swift 3.1 的领域 - 命令因信号而失败:非法指令:4
Realm for Swift 3.1 - Command failed due to signal: Illegal instruction: 4
将 Swift 更新到 v3.1 后,我将 Realm 框架替换为从 Realm Swift 2.5.1 下载的新版本,但出现以下问题:
Command failed due to signal: Illegal instruction: 4
已经检查过 and this,但没有用。
这是错误描述,但不确定是否有帮助。
CompileSwift normal x86_64
/Users/linhcn/Documents/XcodeProjects/HerdManager/HerdManager/Models/ActionCategory.swift
-target x86_64-apple-ios9.3 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk
-I /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator
-F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator
-F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/FileBrowser
-F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/Realm
-F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/RealmSwift
-F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/Toast-Swift
-F /Users/linhcn/Documents/XcodeProjects/HerdManager/HerdManager/Frameworks
-enable-testing -g -module-cache-path /Users/linhcn/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG
-D COCOAPODS -serialize-debugging-options -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/swift-overrides.hmap
-Xcc -iquote -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-generated-files.hmap
-Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-own-target-headers.hmap -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-all-non-framework-target-headers.hmap
-Xcc -ivfsoverlay -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/all-product-headers.yaml
-Xcc -iquote -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-project-headers.hmap
-Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/include
-Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/DerivedSources/x86_64
-Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/DerivedSources
-Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/linhcn/Documents/XcodeProjects/HerdManager -emit-module-doc-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice~partial.swiftdoc
-serialize-diagnostics-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.dia
-Onone -module-name HerdManager -emit-module-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice~partial.swiftmodule
-emit-dependencies-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.d
-emit-reference-dependencies-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.swiftdeps
-o /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.o
问题已解决。
我猜这是新 Xcode 的 (8.3.2) 错误报告系统的问题。 Apple 可能会添加一些新的编码规则,但不会更新错误报告器。我最终注释掉了所有代码并取消注释每个部分以找出问题所在。它在某些 classes 中报告错误,但实际问题在另一个 class.
中
将 Swift 更新到 v3.1 后,我将 Realm 框架替换为从 Realm Swift 2.5.1 下载的新版本,但出现以下问题:
Command failed due to signal: Illegal instruction: 4
已经检查过
这是错误描述,但不确定是否有帮助。
CompileSwift normal x86_64 /Users/linhcn/Documents/XcodeProjects/HerdManager/HerdManager/Models/ActionCategory.swift -target x86_64-apple-ios9.3 -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.3.sdk -I /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator -F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator -F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/FileBrowser -F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/Realm -F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/RealmSwift -F /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/Toast-Swift -F /Users/linhcn/Documents/XcodeProjects/HerdManager/HerdManager/Frameworks -enable-testing -g -module-cache-path /Users/linhcn/Library/Developer/Xcode/DerivedData/ModuleCache -D DEBUG -D COCOAPODS -serialize-debugging-options -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-generated-files.hmap -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-own-target-headers.hmap -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-all-non-framework-target-headers.hmap -Xcc -ivfsoverlay -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/all-product-headers.yaml -Xcc -iquote -Xcc /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/HerdManager-project-headers.hmap -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Products/Debug-iphonesimulator/include -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/DerivedSources/x86_64 -Xcc -I/Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/DerivedSources -Xcc -DDEBUG=1 -Xcc -DCOCOAPODS=1 -Xcc -working-directory/Users/linhcn/Documents/XcodeProjects/HerdManager -emit-module-doc-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice~partial.swiftdoc -serialize-diagnostics-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.dia -Onone -module-name HerdManager -emit-module-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice~partial.swiftmodule -emit-dependencies-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.d -emit-reference-dependencies-path /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.swiftdeps -o /Users/linhcn/Library/Developer/Xcode/DerivedData/HerdManager-exytfaymknfhzqabpximiccdzmaa/Build/Intermediates/HerdManager.build/Debug-iphonesimulator/HerdManager.build/Objects-normal/x86_64/Invoice.o
问题已解决。
我猜这是新 Xcode 的 (8.3.2) 错误报告系统的问题。 Apple 可能会添加一些新的编码规则,但不会更新错误报告器。我最终注释掉了所有代码并取消注释每个部分以找出问题所在。它在某些 classes 中报告错误,但实际问题在另一个 class.
中