Has anyone else encountered continuous crashing of SourceKit (not the editor per se) on Xcode 7 beta 3 when working with a project that uses a dynamic framework? My particular problem is when I use the Realm framework (https://github.com/realm/realm-cocoa/tree/swift-2.0), but from what I gather after research, it sounds like a more general problem.
The crashes manifests as various symptoms including, but not limited to:
- Syntax highlighting disabled.
- Code completion disabled.
- Quickhelp documentation disabled.
- The 'Report a Problem' dropdown constantly appearing.
- import <FrameworkName> is marked with an error - could not build Objective-C module XXX.
- Debugging functionality is crippled - breakpoints work, but variables cannot be examined. (This is the dealbreaker).
SourceKit logs in console show an error like below:
Crashed Thread: 8
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
Assertion failed: ((!FileContext || issue != Status::Malformed) && "error deserializing an individual record"), function error, file /Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-700.0.45/src/swift/include/swift/Serialization/ModuleFile.h, line 352.
Trying to examine a var while debugging results in something like:
(lldb) po self
warning: Swift error in module MyProject:
Swift had fatal errors constructing the ast context for this module: missing required modules: 'Realm.Private', 'Realm'
Debug info from this module will be unavailable in the debugger.
warning: Swift error in module MyProjectShared:
Swift had fatal errors constructing the ast context for this module: missing required modules: 'Realm.Private', 'Realm'
Debug info from this module will be unavailable in the debugger.
warning: Swift error in module RealmSwift:
Swift had fatal errors constructing the ast context for this module: missing required modules: 'Realm.Private', 'Realm'
Debug info from this module will be unavailable in the debugger.
error: Error in auto-import:
failed to get module 'MyProject' from AST context