Closed swift-ci closed 7 years ago
As a workaround, you can add "-Xfrontend -disable-typo-correction" to your "Other Swift Flags" build setting for now.
Comment by Luis Padron (JIRA)
@belkadan This has definitely helped with the segfaults, however syntax highlighting and auto completion is basically broken. As soon as I begin typing they get removed. Not sure what could be causing that issue.
Hm, maybe SourceKit isn't picking up the Other Swift Flags.
Comment by Luis Padron (JIRA)
@belkadan Thanks for fixing this! Is there anyway to test this currently with Xcode 9 beta 2? Or will this be released in a new beta?
You can grab a "development snapshot" from https://swift.org/download/#swift-40-development, as long as it was built after the day the fix went in.
Environment
``` none Model Name: iMac Model Identifier: iMac17,1 Processor Name: Intel Core i5 Processor Speed: 3.2 GHz Number of Processors: 1 Total Number of Cores: 4 L2 Cache (per Core): 256 KB L3 Cache: 6 MB Memory: 24 GB Boot ROM Version: IM171.0105.B20 SMC Version (system): 2.33f10 Realm version 2.8.3 Xcode 9 Beta 2 Cocoapods 1.3.0.beta.2 Podfile: platform :ios, '9.0' use_frameworks! inhibit_all_warnings! def all_pods pod 'RealmSwift' pod 'UICircularProgressRing' pod 'UIEmptyState' pod 'LPIntegratedRating' end target 'GradePoint' do all_pods end target 'GradePointTests' do all_pods end target 'GradePointUITests' do all_pods end post_install do |installer| installer.pods_project.targets.each do |target| puts target.name target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = ‘4.0’ end end end ```Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug, 4.0Regression, CompilerCrash, Serialization | |Assignee | None | |Priority | Medium | md5: cbfd64381e21f6216f34f44c12e8c9b2Issue Description:
Since upgrading to Swift 4 and Xcode 9 Beta 2. The amount of segfaults I have received have increased tenfold. At this point the compiler is segfaulting for simple spelling mistakes. There are no actual errors given just the basic
Command failed due to signal: Segmentation fault: 11 error.
Not exactly sure what is causing all these segfaults but I have noticed that Realm seems be involved in causing these. Removing my import for RealmSwift when the compiler has segfaulted and rebuilding seems to generate actual error messages and such.
Here is a log of a segfault where spelling statu as status inside a switch caused a segfault:
A full project can be found here using the ios11 branch while running on Xcode 9 Beta 1 - 2. Just writing basic code causes issues on my setup, and im guessing it will happen for anyone else too.