NSError.description crashes when NSError.userInfo contains a swift object

Originator:heath.borders
Number:rdar://19899687 Date Originated:19-Feb-2015 11:42 PM
Status:Closed Resolved:
Product:Developer Tools Product Version:Version 6.1.1 (6A2008a)
Classification:Serious Bug Reproducible:Always
 
Summary:
When an NSError's userInfo contains a swift object as a value, NSError.description crashes thusly:

2015-02-19 23:34:55.198 bug_swift_object_in_nserror_userinfo[29073:272589] *** NSForwarding: warning: object 0x7feae8b4b6d0 of class 'bug_swift_object_in_nserror_userinfo.MySwiftObject' does not implement methodSignatureForSelector: -- trouble ahead
Unrecognized selector -[bug_swift_object_in_nserror_userinfo.MySwiftObject _copyDescription]

Steps to Reproduce:
1. Run the attached project
2. Observe the crash

Expected Results:
NSError.description returns a string containing the description of the userInfo dictionary, which should include the description of any Printable swift objects.

Actual Results:
NSError.description crashes thusly:

2015-02-19 23:34:55.198 bug_swift_object_in_nserror_userinfo[29073:272589] *** NSForwarding: warning: object 0x7feae8b4b6d0 of class 'bug_swift_object_in_nserror_userinfo.MySwiftObject' does not implement methodSignatureForSelector: -- trouble ahead
Unrecognized selector -[bug_swift_object_in_nserror_userinfo.MySwiftObject _copyDescription]

Version:
Version 6.1.1 (6A2008a)

Notes:
The project is also available on github: https://github.com/hborders/bug_swift_object_in_nserror_userinfo

Configuration:

Comments

Fixed in Xcode 6.3b3!

By heath.borders at March 20, 2015, 4:34 a.m. (reply...)

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!