Xcode 9 beta 3: segmentation fault 11 at compile time

Hi,
I've experienced an issue on building my project using XCode 9. Actually, I've reproduced this behaviour with all the betas (1, 2, and 3) of XCode 9, but all works perfectly using XCode 8.


The problem occures in projects with objective-c and swift code, where swift code interacts with objective-c code and viceversa.

Analyzing the problem, I've found that the compiler seems to have problems to identity the correct type of objective-c instances of classes compiant to swift protocol. In detail, I've used forward declaration to refere to the swift protocol from objective-c header file of the class.


I've also reproduced this issue in a little example attached at this thread.


How can I resolve that? Is this a kind of bug that will be resolved in future betas of XCode 9?


Thank you,
Giovanni

Accepted Reply

The segmentation fault is the Swift compiler crashing. There's not much you can do to avoid it, other than to find an alternative way of writing your source code to get around the specific problem.


You should (as soon as possible) submit a bug report (link in the bottom right corner of the web page), and include your sample code that demonstrates the problem. That way, we hope, the problem may be solved in beta 4.

Replies

The segmentation fault is the Swift compiler crashing. There's not much you can do to avoid it, other than to find an alternative way of writing your source code to get around the specific problem.


You should (as soon as possible) submit a bug report (link in the bottom right corner of the web page), and include your sample code that demonstrates the problem. That way, we hope, the problem may be solved in beta 4.

Ok thank you!