Xcode 9 beta1: Swift generics in custom class crashes Instruments when specifying Dictionary type

Originator:kontakt
Number:rdar://32734461 Date Originated:06/13/2017
Status:Open Resolved:
Product:Xcode Product Version:9.0 beta (9M136h)
Classification:Bug Reproducible:Always
 
Summary:
Dictionary types as generic type on a custom Swift class (e.g., MyClass<[String:String]>(value: ["hello":"world"])) in Xcode 9 beta 1 causes Leaks profile in Instruments to stop profiling after ~1s.

Steps to Reproduce:
1. Create a custom Swift class, e.g., MyClass<T> that uses generics and has a property of the generic type
2. Instantiate an object of that class with a Dictionary type, e.g., MyClass<[String:String]>(value: [:])
3. Profile the application in Instruments with Leaks profiling (Product > Profile in Xcode)

Expected Results:
Leak profile in Instruments should profile allocations and leaks without stopping

Observed Results:
Instruments stops profiling after ~1s

Version:
Xcode 9.0 beta (9M136h)
macOS Sierra 10.12.5 (16F73)

Configuration:
Does not occur in Xcode 8.3.3 (8E3004b)
Does not occur when using other types as generic type, e.g., MyClass<String>(value: "hello")

Attachments:
https://gist.github.com/jensmeder/18f7b62822249823f78f7de6e1d5e0dd

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!