Since Xcode 7 and Swift 2.0, I get the error above, like in the screenshot shown here:
I have no idea where this is coming from, cleaning and deleting derived data didn't work.
Anyone else experiencing this problem?
Project settings:
Target settings:
I faced this issue when used the same constant names in a guard construction
let activityVC = ...
guard let activityVC = activityVC else { return }
But xcode didn't show me any warning for this row.
This is normally a Swift compiler bug, and if compiler is already late-version, we can only workaround it, for example:
Go to project Build settings -> Swift Compiler - code generation -> Optimization Level
-> For both Debug & Release select option "Fast,Single-File Optimization[-O]
Above forces compiler to operate a little differently, which seems to prevent crash.
Note that both "
-O
" and "-Osize
" may fix the crash, but I prefer-O
to match release's settings, and avoid surprises in release.
I have the same problem with all Xcode 6.3 projects, I open in Xcode 7.0. I created a new project, copied all my source files and resources and everything worked without this compiler error. I thought this has something to do with the project settings. I turned off the Swift compile Optimization to "none" and the Trap 6 was gone away. Perhaps there are other settings, which also generate trouble, but for me this it was.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With