Segmentation Fault 11due to generics

Hi all,


I'm having trouble with a generic inside a framwork that I have.


I have 2 class with almost the same thing and 1 works and the other produces this seg fault 11.


public class TableViewDataSource<T, U: UITableViewCell where U: Cell> : NSObject, UITableViewDataSource { } ok

public class FormTableViewDataSource<T, U: UITableViewCell where U: Cell> : NSObject, UITableViewDataSource { } seg fault


Cell is a protocol.


If I remove the UITableViewCell where U:Cell at the FormTableViewDataSource then it works.

If I remove the UITableViewCell where U:Cell at the TableViewDataSource then I still have seg fault.


this is the stack dump last part.

1. While resolving type ASFTableViewDataSource at [/Users/test/Development/s/ios/app/Sections/ASFTableViewDataSource.swift:19:11 - line:19:11] RangeText="A"
2. While resolving type FormTableViewDataSource<FormFieldBoundary, BaseFormViewCell> at [/Users/test/Development/s/ios/app/Sections/ASFTableViewDataSource.swift:8:44 - line:8:103] RangeText="FormTableViewDataSource<FormFieldBoundary, BaseFormViewCell>"
3. While reading from /Users/test/Library/Developer/Xcode/DerivedData/app-dqpzjwruogqjbvhirhwksvcdmofo/Build/Products/Debug-iphonesimulator/ASFUIKit.framework/Modules/ASFUIKit.swiftmodule/x86_64.swiftmodule
4. While deserializing decl #31 (CLASS_DECL)
5. While deserializing 'U' (GenericTypeParamDecl #227)
6. While deserializing 'UITableViewCell' (ClassDecl #449)
7. Cross-reference to module 'UIKit'
  ... UITableViewCell
8. While type-checking expression at [<invalid loc> - <invalid loc>]
9. While loading conformances for declaration 0x7f827518e940 at <invalid loc>
10. While loading conformances for declaration 0x7f82751970e0 at <invalid loc>
11. While deserializing decl #1900 (XREF)
12. Cross-reference to module 'ObjectiveC'
  ... NSObject
  ... description
  ... with type String
13. While deserializing decl #31 (CLASS_DECL)


Does someone know what is happening?

Replies

It's now fixed in XCode Version 7.1 beta (7B75), I hope they will backport the fix in version 7.0.