如何修复Swift编译问题陷阱6

时间:2018-12-22 05:17:43

标签: swift xcode

该问题发生在带有XCode10的Swift3中。这可能是一个Swift错误。实际上,清理和重建可以解决该问题,但是这花费了太多时间。任何人都知道解决或避免该问题的有效方法。谢谢

** DESERIALIZATION FAILURE (please include this section in any bug report) ***
could not deserialize type for '_': could not deserialize type for 'operImageView': top-level value not found
Cross-reference to module 'LKImageKit'
... LKImageView

0  swift                    0x000000010460f59a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000010460ed4e SignalHandler(int) + 302
2  libsystem_platform.dylib 0x00007fff5e91df5a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fe96482b200 _sigtramp + 99668672
4  libsystem_c.dylib        0x00007fff5e6bb1ae abort + 127
5  swift                    0x0000000101a74feb swift::ModuleFile::fatal(llvm::Error) + 1915
6  swift                    0x0000000101aac643 getSILDeclRef(swift::ModuleFile*, llvm::ArrayRef<unsigned long long>, unsigned int&) + 307
7  swift                    0x0000000101aae984 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 740
8  swift                    0x0000000101b5576b swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 331
9  swift                    0x000000010089d92e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34558
10 swift                    0x0000000100891d35 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
11 swift                    0x0000000100837965 main + 1349
12 libdyld.dylib            0x00007fff5e60f015 start + 1

WSRecommendHeaderCollectionReusableView~partial.swiftmodule
/Users/levinyang/Library/Developer/Xcode/DerivedData/myProject-hgotlvyrysfhcyeakqaatptobuxm/Build/Intermediates.noindex/myProject.build/Debug-iphoneos/myProject.build/Objects-normal/arm64/WSActionSheetRecommendFlowHandler~partial.swiftmodule
---
2.  While deserializing SIL vtable for 'WSNotificationOperCell' in module 'myProject'


** DESERIALIZATION FAILURE (please include this section in any bug report) ***
could not deserialize type for '_': could not deserialize type for 'operImageView': top-level value not found
Cross-reference to module 'LKImageKit'
... LKImageView

0  swift                    0x000000010460f59a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x000000010460ed4e SignalHandler(int) + 302
2  libsystem_platform.dylib 0x00007fff5e91df5a _sigtramp + 26
3  libsystem_platform.dylib 0x00007fe96482b200 _sigtramp + 99668672
4  libsystem_c.dylib        0x00007fff5e6bb1ae abort + 127
5  swift                    0x0000000101a74feb swift::ModuleFile::fatal(llvm::Error) + 1915
6  swift                    0x0000000101aac643 getSILDeclRef(swift::ModuleFile*, llvm::ArrayRef<unsigned long long>, unsigned int&) + 307
7  swift                    0x0000000101aae984 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 740
8  swift                    0x0000000101b5576b swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 331
9  swift                    0x000000010089d92e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34558
10 swift                    0x0000000100891d35 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
11 swift                    0x0000000100837965 main + 1349
12 libdyld.dylib            0x00007fff5e60f015 start + 1

WSRecommendHeaderCollectionReusableView~partial.swiftmodule
/Users/levinyang/Library/Developer/Xcode/DerivedData/myProject-hgotlvyrysfhcyeakqaatptobuxm/Build/Intermediates.noindex/myProject.build/Debug-iphoneos/myProject.build/Objects-normal/arm64/WSActionSheetRecommendFlowHandler~partial.swiftmodule
---
2.  While deserializing SIL vtable for 'WSNotificationOperCell' in module 'myProject'

error: Abort trap: 6  

1 个答案:

答案 0 :(得分:2)

这是一个Swift编译器错误。可能是通过链接由不同版本的编译器编译的模块或某些其他不受支持的行为来触发它的,但它仍然应该不会崩溃。

但是,您说这是Swift 3问题。 Swift开发人员不再支持Swift3。他们正在使用Swift5。如果您可以在Swift 5中重现该问题,则可以在https://bugs.swift.org上提交错误报告。