1

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?

4

1 回答 1

0

我在 Xcode 10.2.1 中遇到了同样的问题。

经过几天的尝试解决它,我发现在我的情况下,这个错误是由一个继承了 Objective-C 第三方类的 Swift 类引起的(更具体地说是FSCalendarCell来自https://github.com/WenchaoD/FSCalendar的类)。

我为 Objective-C 重写了 Swift 类,它编译并运行没有任何问题。

于 2019-07-16T22:16:32.367 回答