System Preferences window does not activate

Originator:adurdin
Number:rdar://9875598 Date Originated:1/8/2011
Status:Open Resolved:
Product:Mac OS X Product Version:10.7/11A2063
Classification:Usability/UI Reproducible:Always
 
Summary:

If another application is activated while the System Preferences window is displaying the picture menu in the “Users & Groups” section, the System Preferences window will not come to the front when activated via Mission Controls or via Command+Tab.


Steps to Reproduce:

1. Open a Finder window.

2. Open System Preferences.

3. Select the Users & Groups icon.

4. If no user account is selected, select a user account.

5. Click the user picture to display the picture menu.

6. Switch to the Finder with any of Mission Control, Command+Tab, a click on its Dock icon, or a mouse click in its window.

7. Attempt to switch back to System Preferences with any of Mission Control, Command+Tab, or a click on its Dock icon.


Expected Results:

System preferences will be activated, and its window will become frontmost.


Actual Results:

System Preferences is not activated. Its window remains behind the frontmost window.


Notes:

When this bug is triggered, System Preferences can still be activated by clicking in its window, and it will then resume normal behaviour.

Comments

Summary: Some methods in AppKit, such as -[NSPathCell autoUpdateCellContents] contain calls to -[NSURL(BRCloudPathComponent) brpathComponentDisplayMetadataWithOptions:].

This works in 10.10 because CloudDocs.framework, which is where this method is actually implemented gets linked in. But it looks like CloudDocs.framework doesn't get linked on 10.11, and this ends up getting a "unrecognized selector" crash.

Steps to Reproduce: Run this code on a 10.11 system:

NSURL *url = [NSURL fileURLWithPath:[@"~/Library/Mobile Documents/2BUA8C4S2C~com~agilebits~onepassword" stringByExpandingTildeInPath]];
[self.pathControl setURL:url];

Replace the last part of the path with a valid URL inside of Mobile Documents.

Expected Results: Not a crash.

Actual Results: Crash. I've attached a real world crash report, as well as one from my sample code, as well as my sample code.

Version: Mac OS X 10.11.0 (15A282a)

Notes: This is a regression. The crash does not exist in 10.10.5.

Configuration: Hardware seems irrelevant. Only OS X version.

Attachments: http://cl.ly/2m013E1y1s2W

By PziiJacketiiz at Jan. 17, 2017, 7:23 a.m. (reply...)

This appears to be resolved in Mavericks.

Summary: Some methods in AppKit, such as -[NSPathCell autoUpdateCellContents] contain calls to -[NSURL(BRCloudPathComponent) brpathComponentDisplayMetadataWithOptions:].

This works in 10.10 because CloudDocs.framework, which is where this method is actually implemented gets linked in. But it looks like CloudDocs.framework doesn't get linked on 10.11, and this ends up getting a "unrecognized selector" crash.

Steps to Reproduce: Run this code on a 10.11 system:

NSURL *url = [NSURL fileURLWithPath:[@"~/Library/Mobile Documents/2BUA8C4S2C~com~agilebits~onepassword" stringByExpandingTildeInPath]];
[self.pathControl setURL:url];

Replace the last part of the path with a valid URL inside of Mobile Documents.

Expected Results: Not a crash.

Actual Results: Crash. I've attached a real world crash report, as well as one from my sample code, as well as my sample code.

Version: Mac OS X 10.11.0 (15A282a)

Notes: This is a regression. The crash does not exist in 10.10.5.

Configuration: Hardware seems irrelevant. Only OS X version.

Attachments: http://cl.ly/2m013E1y1s2W

By PziiJacketiiz at Jan. 17, 2017, 7:23 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!