NSRemoteWindowControll throws exception when used after extension warning dialog

Originator:chris
Number:rdar://13821065 Date Originated:06-May-2013 04:13 PM
Status:Closed Resolved:
Product:OS X Product Version:10.8.3
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:

When an NSSavePanel is used to name a file with an improper extension the operating system automatically warns the user with a dialog that allows them to choose using both extensions or just the proper extension. When the 'Use both' option is selected, further uses of the NSSavePanel that would produce the same dialog fail with an exception that is caught. 

Steps to Reproduce:

This is happening in our application, Napkin, but I have been able to reproduce the problem with Preview.app:

1. Launch Preview.app and open an image file (say test.png)
2. Perform a 'Save As' (option-cmd-shift-s)
3. Make sure 'Hide Extension' is checked
4. Enter the filename 'Test.pdf'
5. Make sure the Format is 'PNG' and click 'Save'
6. In the resulting dialog choose 'Use both'
7. Do another 'Save As' on the file. 
8. Enter the name 'Test 2.pdf' and click 'Save'

Expected Results:

The extension warning dialog appears again and after the file is saved to the new location and name.

Actual Results:

After a bit of a hang, the save panel will dismiss and no file saving action will occur. 

Notes:

This hits us a bit harder in our application because of the following scenario:

1. User saves file to name 'Test.export' that produces the warning dialog.
2. User dismisses dialog with a 'Use both' and their file is saved to the name 'Test.export.napkin'.
3. User then attempts to export our document to an image file, 'Test.export.jpeg' using the save panel.
4. The warning dialog never appears and the save panel dismisses with no file export occurring.

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!