NSCollectionView throws unrecognized selector [NSButtonCell item] using accessibility
| Originator: | tapted | ||
| Number: | rdar://15558256 | Date Originated: | 2013-11-29 |
| Status: | Duplicate/15459704 | Resolved: | |
| Product: | OX X SDK | Product Version: | 10.9 |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: I think this is a Mavericks regression. When creating an NSCollectionView with a prototype that is simply an NSButton, inspecting accessibility on the view throws an NSException, like 2013-11-29 11:41:40.178 a.out[25520:507] -[NSButtonCell item]: unrecognized selector sent to instance 0x7fe0f2d18dd0 And the inspector reports a warning: "Parent does not report element as one of its children" Pretty sure this worked in Mountain Lion. Call stack is like 0x95b35eea [CoreFoundation + 0x00169eea ] -[NSObject(NSObject) doesNotRecognizeSelector:] 0x95a81801 [CoreFoundation + 0x000b5801 ] ___forwarding___ 0x95a813ed [CoreFoundation + 0x000b53ed ] __forwarding_prep_0___ 0x941e132f [AppKit + 0x00a8032f ] -[NSCollectionView(NSCollectionViewAccessibility) accessibilityIndexOfChild:] 0x93b2b3ef [AppKit + 0x003ca3ef ] -[NSObject(NSObjectAccessibilityAttributeAccessAdditions) accessibilityIndexForChildUIElementAttributeForParameter:] 0x97c132ae [libobjc.A.dylib + 0x0001a2ae ] -[NSObject performSelector:withObject:] 0x93b2b363 [AppKit + 0x003ca363 ] -[NSObject(NSObjectAccessibilityAttributeAccessAdditions) accessibilityAttributeValue:forParameter:] 0x93b2f105 [AppKit + 0x003ce105 ] CopyParameterizedAttributeValue 0x95901f75 [HIServices + 0x00023f75 ] _AXXMIGCopyParameterizedAttributeValue 0x9590d233 [HIServices + 0x0002f233 ] _XCopyParameterizedAttributeValue 0x958e4bda [HIServices + 0x00006bda ] mshMIGPerform 0x95a520f4 [CoreFoundation + 0x000860f4 ] __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ 0x95a5205a [CoreFoundation + 0x0008605a ] __CFRunLoopDoSource1 0x95a42821 [CoreFoundation + 0x00076821 ] __CFRunLoopRun Steps to Reproduce: See the attached repro case. 1. Compile with `clang app.m -Wall -framework Cocoa` 2. Run (./a.out) 3. Open Accessibility Inspector and hover over the "test" button. Expected Results: Inspecting accessibility shouldn't throw unhandled exceptions Actual Results: Unhandled exception: 2013-11-29 11:41:40.178 a.out[25520:507] -[NSButtonCell item]: unrecognized selector sent to instance 0x7fe0f2d18dd0 And the inspector reports a warning: "Parent does not report element as one of its children" Version: Xcode Version 5.0.1 (5A2053) / System Version: OS X 10.9 (13A603) Notes: Configuration: When I compile, these are the library versions I'm currently picking up. $ otool -L a.out a.out: /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 20.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.11.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1265.0.0)
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!