Hello,
I am using NSPrintOperation with runOperationModalForWindow as following :
NSPrintOperation *op;
NSPrintInfo *myPrintInfo;
myPrintInfo = [[NSPrintInfo alloc] init];
//
// Set attributes of myPrintInfo
//
op = [NSPrintOperation printOperationWithView: detailsTextView printInfo:myPrintInfo];
[op runOperationModalForWindow:[self window] delegate:nil didRunSelector:NULL contextInfo: NULL];
With the above code, It is working fine for all OS , except 10.13. On 10.13 OS for remote type Printer, execution hangs at runOperationModalForWindow. Following is sample where it hang:
Here what cares needs to take?
--------------------------------------------------------
runOperationModalForWindow:delegate:didRunSelector:contextInfo:] (in AppKit) + 536 [0x7fff4a00441a]
+ 2760 __91-[NSConcretePrintOperation runOperationModalForWindow:delegate:didRunSelector:contextInfo:]_block_invoke.385 (in AppKit) + 149 [0x7fff4a462967]
+ 2760 -[NSPrintPanel beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:] (in AppKit) + 576 [0x7fff4a005a2f]
+ 2760 -[NSWindowController window] (in AppKit) + 110 [0x7fff49d8cd0f]
+ 2760 -[NSWindowController _windowDidLoad] (in AppKit) + 547 [0x7fff49de8e8c]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0x15e40 [0x117168e40]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0x15f88 [0x117168f88]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0xabcb [0x11715dbcb]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0xb0a6 [0x11715e0a6]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0xaa1d [0x11715da1d]
+ 2760 ??? (in PrintCocoaUI) load address 0x117153000 + 0x1d251 [0x117170251]
+ 2760 CUPSPrinter::GetPPD(ppd_file_s**) (in PrintCore) + 270 [0x7fff4b0a4562]
+ 2760 cupsGetPPD (in libcups.2.dylib) + 58 [0x7fff72ea56d4]
+ 2760 cupsGetPPD3 (in libcups.2.dylib) + 479 [0x7fff72ea58ca]
+ 2760 ??? (in libcups.2.dylib) load address 0x7fff72e6c000 + 0x3a28f [0x7fff72ea628f]
+ 2760 _httpResolveURI (in libcups.2.dylib) + 1002 [0x7fff72e87887]
+ 2760 poll (in libsystem_kernel.dylib) + 10 [0x7fff7483209a]
......
..... ....
Thanks ,
Simran