Calling super in debugger from NSTextAttachmentCell subclass crashes Xcode

Originator:lithium3141
Number:rdar://13904749 Date Originated:15-May-2013 02:59 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode 4.6.2 (4H1003)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
15-May-2013 02::
Summary: Creating a custom subclass of NSTextAttachmentCell that overrides -cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex: and calling the superclass' implementation from the debugger inside that method crashes Xcode.

Steps to Reproduce:
1. Create a new Cocoa application.
2. Add a custom subclass of NSTextAttachmentCell. Override -cellFrameForTextContainer:proposedLineFragment:glyphPosition:characterIndex: to do nothing but return the superclass's result.
3. Set a breakpoint inside the overridden method.
4. Write the rest of the app such that the overridden method gets called. (Sample code attached.)
5. When the debugger stops at the set breakpoint in the overridden method, issue the following command:

p (NSRect)[super cellFrameForTextContainer:textContainer proposedLineFragment:lineFrag glyphPosition:position characterIndex:charIndex]

Expected Results: The debugger prints a nicely formatted NSRect that NSTextAttachmentCell's implementation of the method in question returned.

Actual Results: Xcode crashes. No Problem Reporter window appears, and no crash report is saved to ~/Library/Logs/DiagnosticReports.

Regression: Unknown.

Notes: Sample code attached. Set a breakpoint at CFSCAppDelegate.m:32.

15-May-2013 02::
'CellFrameSuperCrash.zip' and 'rmbp.spx' were successfully uploaded

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!