Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SIGPIPE while printing after ~10 minutes



Hello list,
Maybe someone could take a look at the code below and tell me what I
am doing wrong...

I managed to isolate the code that generates a SIGPIPE error and the
corresponding crash. The views (accessoryView and printedView) are
empty and
the crash is happening also when the views are loaded from a nib.

It is weird and I really could use some help on this.

Below is the code that generates the crash and should be used like
this :
1. Call it once
2. wait 10 minutes !!!! If you don't wait, it will work nice.
3. call it again --> SIGPIPE

What I understood until now :
- is related with the accessory panel
- maybe, somewhere there is a timer that closes something , i have no
idea what.

Regards, Cristian

- (void) startPrinting
{
NSView* accessoryView = [[NSView alloc]
initWithFrame:NSMakeRect(10,10,100,100)];
NSView* printedView = [[NSView alloc]
initWithFrame:NSMakeRect(10,10,100,100)];
//get printer information
NSPrintInfo *prntInfo = [NSPrintInfo sharedPrintInfo];
//get printer panel
NSPrintPanel *printPanel = [NSPrintPanel printPanel];
//start print operation
NSPrintOperation *printOp;

[printPanel setAccessoryView:accessoryView];
printOp = [NSPrintOperation printOperationWithView: printedView
printInfo:prntInfo];;

[printOp setPrintPanel:printPanel];
[printOp setShowPanels:YES];

NSLog(@"Run operation");
[printOp runOperation];
[accessoryView release];
[printedView release];
}

PS. Please excuse the crosspost but as I sad, I really need some help.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.