ios - deserialization failure with swift4.2 (xcode10) Abort trap: 6
问题描述
I tried to transfer swift 4 to swift 4.2 with XCode 10.0 release then got this msg:
*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
could not find 'init(frame:)' in parent class
0 swift 0x00000001050f864a PrintStackTraceSignalHandler(void*) + 42
1 swift 0x00000001050f7dfe SignalHandler(int) + 302
2 libsystem_platform.dylib 0x00007fff77964b3d _sigtramp + 29
3 libsystem_platform.dylib 0x00007ffeee8fb4e0 _sigtramp + 1996057024
4 libsystem_c.dylib 0x00007fff778231c9 abort + 127
5 swift 0x000000010255e0fb swift::ModuleFile::fatal(llvm::Error) + 1915
6 swift 0x0000000102595753 getSILDeclRef(swift::ModuleFile*, llvm::ArrayRef<unsigned long long>, unsigned int&) + 307
7 swift 0x0000000102597a94 swift::SILDeserializer::readVTable(llvm::PointerEmbeddedInt<unsigned int, 31>) + 740
8 swift 0x000000010263e84b swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 331
9 swift 0x00000001013889be performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34558
10 swift 0x000000010137cdc5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
11 swift 0x0000000101322a35 main + 1349
12 libdyld.dylib 0x00007fff7777b085 start + 1
and this in the end:
1. While deserializing SIL vtable for 'MenuNavTitleView' in module 'projectName'
error: Abort trap: 6
I looked for some reasons such as .zero, then even I replaced all .zero in my code, it still have this problem.
Does someone know how to fix this fatal error?
解决方案
我在 Xcode 10.2.1 中遇到了同样的问题。
经过几天的尝试解决它,我发现在我的情况下,这个错误是由一个继承了 Objective-C 第三方类的 Swift 类引起的(更具体地说是FSCalendarCell
来自https://github.com/WenchaoD/FSCalendar的类)。
我为 Objective-C 重写了 Swift 类,它编译并运行没有任何问题。
推荐阅读
- junit - 如何在 Vert.x 中创建 Autowired 组件的模拟实例
- linux - 如何将文本添加到重定向到文件的输出
- python - 如何在 sqlalchemy (python) 中使新实例创建更通用?
- java - 有没有更好的方法来准确使用地理围栏而不编写我自己的位置请求服务?
- python - Python - 使用 ffplay 播放视频以更大的分辨率显示文件
- bash - 如何在一个包含 3000 行长的文件中屏蔽每行的 200 个字符?
- c# - Wpf 将文本替换为 RichTextBox
- sql - postgresql:创建确定日期差异的函数的语法错误
- python - boto3在s3文件上传期间处理ClientError
- pass-by-reference - 关于 What's In the Box 代码游戏作业的问题