NSTableView -moveColumn:toColumn: crash

Originator:me
Number:rdar://13082616 Date Originated:24-Jan-2013 04:40 PM
Status:Closed Resolved:
Product:Mac OS X Product Version:10.8.2 (12C3006)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
24-Jan-2013 04:40 PM Jonathon Mah:
Calling -[NSTableView moveColumn:toColumn:], interleaved with -[NSTableView addTableColumn:], can crash in -[NSTableHeaderData _didMoveFromColumn:toColumn:animated:].

To reproduce: Create a view-based table view (not sure if view-based is significant) with one column in IB. Then the following sequence will crash:

[tableView addTableColumn:[self createColumnWithIdentifier:@"1"]];
[tableView moveColumn:1 toColumn:0];
[tableView addTableColumn:[self createColumnWithIdentifier:@"2"]];
[tableView moveColumn:2 toColumn:1];


But this alternate sequence doesn't crash:

[tableView addTableColumn:[self createColumnWithIdentifier:@"1"]];
[tableView addTableColumn:[self createColumnWithIdentifier:@"2"]];
[tableView moveColumn:1 toColumn:0];
[tableView moveColumn:2 toColumn:1];


12-Feb-2013 09:21 AM Apple Developer Bug Reporting Team :
A sample project that shows the issue would expedite things. A crash log would be helpful too.

To locate the crash log(s), please check the following locations (you may need to do this in a Terminal window, rather than using Finder): 

~/Library/Logs/DiagnosticReports 
/Library/Logs/DiagnosticReports 

If you are not able to locate any crash report information in either of these locations, please check the /var/log/system.log for any relevant 
error messages from "crashreporter" or "crashdump".

Please upload and attach all relevant files to this bug report.


12-Feb-2013 04:37 PM Jonathon Mah:
Sample project is attached. Note that the only code necessary are the four lines I submitted IN THE ORIGINAL REPORT.

12-Feb-2013 04:37 PM Jonathon Mah:
'NSTableView Radar 13082616.zip' was 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!