NSSavePanel hangs when allowedFileTypes contain leading dots
Originator: | kpa | ||
Number: | rdar://30512012 | Date Originated: | 14-Feb-2017 03:48 PM |
Status: | Open | Resolved: | |
Product: | macOS | Product Version: | 10.12.3 |
Classification: | Reproducible: | Always |
Area: Performance (slow, hung) Summary: Showing an NSSavePanel where allowedFileTypes contain leading dots hangs the app when the app is sandboxed. For example the following hangs: let savePanel = NSSavePanel() savePanel.allowedFileTypes = [".mov"] savePanel.beginSheetModal(for: view.window!) { _ in } It logs: __54-[NSVBSavePanel advanceToRunPhaseIfNeededLayerCentric]_block_invoke : Could not advance an Open/Save panel to run phase due to error: Error Domain=com.apple.ViewBridge Code=16 "(null)" UserInfo={com.apple.ViewBridge.error.hint=advance to run phase, com.apple.ViewBridge.error.description=NSViewBridgeServiceInvalidError} Steps to Reproduce: 1. Initialize a NSSavePanel 2. Set allowedFileTypes = [".mov"] 3. Show the save panel Expected Results: The same behavior as if allowedFileTypes ["mov"] was specified. Alternatively, in Swift, a type safe way to provide allowedFileTypes. Actual Results: The app hangs Version: 10.12.3 Notes: Configuration: This happens for sandboxed apps that have the com.apple.security.files.user-selected.read-write entitlement Attachments: 'NSSavePanel.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!
kpa
Crash report and sysdiagnose attached.
Apple Developer Relations
Engineering has provided the following information regarding this issue:
Thank for the quick response time!
Either there’s something in the system configuration or perhaps drive contents that is different between his machine and our setups that we haven’t accounted for yet. Since you’re seeing the openAndSavePanelService crash, can we get you please provide crash logs?
Having the crash traces for openAndSavePanelService could be quite helpful (and for your own app, if there is one).
macOS sysdiagnose Instructions: https://developer.apple.com/services-account/download?path=/OS_X/OS_X_Logs/sysdiagnose_Logging_Instructions.pdf
For a complete list of logging instructions visit: https://developer.apple.com/bug-reporting/profiles-and-logs/
kpa
I'm still seeing this issue. Any information in particular you're looking for?
I didn't notice this earlier but when it crashes this is logged to system.log:
Apr 27 08:24:38 Neo com.apple.xpc.launchd1: Service exited due to signal: Segmentation fault: 11 sent by exc handler[0]
Apple Developer Relations
We cannot reproduce.
I can’t reproduce the bug in the attached sample app or my own, in 10.12.2, 10.12.3.
Please update your bug report to let us know if this is still an issue for you, and provide any additional information.