Non-ascii characters in printer name breaks printing from Apple apps

Originator:filipp
Number:rdar://7816593 Date Originated:01-Apr-2010 08:45 AM
Status:Closed Resolved:01-June-2010
Product:Mac OS X Product Version:10.6.3/10D573
Classification:Serious Bug Reproducible:Always
 
Summary:
Apple's productivity apps, such as Mail will not open the print dialog if any of the printers on the network with Bonjour support use non-ASCII characters in their names. The problem is most evident with mail which consistantly throws an exception when trying to open a print dialog. The problem occurs only with an admin account and only in Apple software, not for instance Office or any Adobe software.

Steps to reproduce:
Name your networked, Bonjour-enabled printer "Mörkö"
Try printing from Mail using an admin account

Expected results:
Printing should work. There should be a printer named "Mörkö" in the Nearby Printers list if it hasn't been added yet.
The printers should also be browsable in System Preferences > Print & Fax > Add printer

Actual results:
The print dialog will either not open at all and throw the following exception:
31.3.2010 13.54.02	Mail[3276]	An exception was thrown '*** -[NSCFDictionary setObject:forKey:]: attempt to insert nil key'. Stack trace:
(
	0   CoreFoundation                      0x00007fff857a1444 __exceptionPreprocess + 180
	1   libobjc.A.dylib                     0x00007fff876ea0f3 objc_exception_throw + 45
	2   CoreFoundation                      0x00007fff857a1267 +[NSException raise:format:arguments:] + 103
	3   CoreFoundation                      0x00007fff857a11f4 +[NSException raise:format:] + 148
	4   Foundation                          0x00007fff87d29a84 -[NSCFDictionary setObject:forKey:] + 164
	5   libSystem.B.dylib                   0x00007fff84c05273 handle_browse_response + 236
	6   libSystem.B.dylib                   0x00007fff84c05047 DNSServiceProcessResult + 717
	7   PrintCocoaUI                        0x00000001188170c5 RunningAsRoot + 84360
	8   Foundation                          0x00007fff87d3785a _nsnote_callback + 167
	9   CoreFoundation                      0x00007fff85749e3a __CFXNotificationPost + 954
	10  CoreFoundation                      0x00007fff857363e8 _CFXNotificationPostNotification + 200
	11  Foundation                          0x00007fff87d2e7c4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
	12  Mail                                0x0000000100002611 0x0 + 4294977041
	13  Foundation                          0x00007fff87df9167 _performFileHandleSource + 1254
	14  CoreFoundation                      0x00007fff8573f271 __CFRunLoopDoSources0 + 1361
	15  CoreFoundation                      0x00007fff8573d469 __CFRunLoopRun + 873
	16  CoreFoundation                      0x00007fff8573cc2f CFRunLoopRunSpecific + 575
	17  Foundation                          0x00007fff87d72a24 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 270
	18  Mail                                0x00000001000b1b85 0x0 + 4295695237
	19  AppKit                              0x00007fff8733accf -[NSView(NSPrinting2) _knowsPagesFirst:last:] + 168
	20  AppKit                              0x00007fff87194333 -[NSConcretePrintOperation(NSInternal) _validatePagination] + 198
	21  AppKit                              0x00007fff873a9c8b -[NSPrintPreviewController start] + 811
	22  Foundation                          0x00007fff87d3785a _nsnote_callback + 167
	23  CoreFoundation                      0x00007fff85749e3a __CFXNotificationPost + 954
	24  CoreFoundation                      0x00007fff857363e8 _CFXNotificationPostNotification + 200
	25  Foundation                          0x00007fff87d2e7c4 -[NSNotificationCenter postNotificationName:object:userInfo:] + 101
	26  Mail                                0x0000000100002611 0x0 + 4294977041
	27  PrintCocoaUI                        0x000000011880eacb RunningAsRoot + 50062
	28  PrintCocoaUI                        0x00000001187ff9a4 0x0 + 4706007460
	29  PrintCocoaUI                        0x0000000118800b43 0x0 + 4706011971
	30  PrintCocoaUI                        0x00000001187ff513 0x0 + 4706006291
	31  PrintCocoaUI                        0x000000011880c9ca RunningAsRoot + 41613
	32  PrintCocoaUI                        0x000000011880c2de RunningAsRoot + 39841
	33  AppKit                              0x00007fff86d7795d -[NSWindowController _windowDidLoad] + 538
	34  AppKit                              0x00007fff86d15113 -[NSWindowController window] + 112
	35  AppKit                              0x00007fff87198462 -[NSPrintPanel beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:] + 627
	36  AppKit                              0x00007fff87196b51 -[NSConcretePrintOperation runOperationModalForWindow:delegate:didRunSelector:contextInfo:] + 478
	37  Mail                                0x00000001000b095f 0x0 + 4295690591
	38  AppKit                              0x00007fff86e8409a -[NSApplication sendAction:to:from:] + 95
	39  AppKit                              0x00007fff86ea8602 -[NSMenuItem _corePerformAction] + 365
	40  AppKit                              0x00007fff86ea836c -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 121
	41  AppKit                              0x00007fff86e8e009 -[NSMenu performKeyEquivalent:] + 272
	42  AppKit                              0x00007fff86e8cdb1 -[NSApplication _handleKeyEquivalent:] + 559
	43  AppKit                              0x00007fff86d5d9e1 -[NSApplication sendEvent:] + 3630
	44  Mail                                0x00000001000340a7 0x0 + 4295180455
	45  AppKit                              0x00007fff86cf4796 -[NSApplication run] + 474
	46  AppKit                              0x00007fff86ced468 NSApplicationMain + 364
	47  Mail                                0x0000000100002150 0x0 + 4294975824
	48  ???                                 0x0000000000000002 0x0 + 2
)

or sometimes it will open but the UI will be unusable (including not being able to cancel the print operation).
*No* networked printer is browsable in the Printer Browser.

Regression:
The problem only occurs when the user is an administrator and the machine is on the same subnet as the printer. The specific printer model in use was a Xerox Phaser 7750.

Notes:
Even if this turns out to be a compatibility issue with some Xerox printers or a Xerox bug, OS X should handle this situation better than just completely failing to print.

Comments

Fixed in 10.6.4


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!