• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Printing crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing crash


  • Subject: Re: Printing crash
  • From: Daniel Jalkut <email@hidden>
  • Date: Mon, 12 Feb 2007 10:21:03 -0500

I don't know what others can do to help you, since as you say printing works in other applications.

You might at least point to a crashing version of your app, in case anybody wanted to observe it themselves and try to make some educated speculation.

In a situation like yours, I would duplicate the project folder, then start hacking code out until the bug goes away. That is, make your app more and more like "every other app" until it behaves like them.

Daniel

On Feb 12, 2007, at 10:01 AM, Jeff Hellman wrote:

Hi All:

I'm experiencing a strange problem: printing (using a print panel)
crashes my app when running on Intel processors.  The printing code
works fine on PowerPC chips as well as when running in Rosetta.  The
code in question is as follows:

NSPrintOperation *op = [NSPrintOperation printOperationWithView:fullTextView];
NSPrintInfo *printInfo = [op printInfo];
[printInfo setHorizontalPagination:NSFitPagination];
/* Set more printInfo settings */
[op setPrintInfo:printInfo];
[op runOperation];


I've tried all kinds of other ways to run the operation, including
runOperationModalForWindow.  After much searching on the net I ran
across a solution that involves

- (void)setCanSpawnSeparateThread:(BOOL)canSpawnSeparateThread

Essentially, the printing operation spawns another thread that, when
running on dual core chips, can cause a concurrency problem.  I
changed the printOperation so that it can't make threads, but no luck.

My only solution is to [op setShowsPrintPanel:NO] which inhibits the
print panel from displaying and causes the print operation to utilize
the default printer. Printing then works fine.  Something causes the
program to crash when displaying the print panel and I'm not sure how
to debug this.

While not a terrible solution, I'd like to get this one solved so that
I can bring back the panel.

I've tried all kinds of clean and builds, printing works fine from
other applications and this is a problem that affects all of my users
on Intel Macs.

Thanks for any help-
Jeff

--
Jeff Hellman
Planbook:  http://www.hellmansoft.com
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Printing crash
      • From: "Jeff Hellman" <email@hidden>
References: 
 >Printing crash (From: "Jeff Hellman" <email@hidden>)

  • Prev by Date: Seeking a contractor in the western Massachusetts area
  • Next by Date: Re: Printing crash
  • Previous by thread: Printing crash
  • Next by thread: Re: Printing crash
  • Index(es):
    • Date
    • Thread