• 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: is lockFocus main thread specific?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: is lockFocus main thread specific?


  • Subject: Re: is lockFocus main thread specific?
  • From: Frank Midgley <email@hidden>
  • Date: Thu, 15 Nov 2007 10:07:01 -0500

On Nov 15, 2007, at 1:31 AM, Michael B Johnson wrote:

This is a Leopard only question.

I have a small test app I've been working on that runs on Leopard in 64 bit that uses NSOperation to do its threading, and am crashing in code that looks like the following. Unfortunately, when I run this on several hundred images, it, occasionally (but consistently) crashes in the drawInRect:.


Are you checking the image you get back from -initWithContentsOfURL:? You should check -isValid and the size of the image. I found that EPS images could cause crashes in -lockFocus if you hadn't called -isValid on them first. Images with massive sizes (and possibly NSZeroSize) could also cause crashes in -lockFocus.

-Frank

------------------------------------
Frank M. Midgley
email@hidden
http://homepage.mac.com/knarf/
Sterling, VA USA

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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


References: 
 >is lockFocus main thread specific? (From: Michael B Johnson <email@hidden>)

  • Prev by Date: Setting the arrow cursor for an NSTextView
  • Next by Date: Re: [Q] capture or assign global hot key like spotlight or quicksilver
  • Previous by thread: is lockFocus main thread specific?
  • Next by thread: Re: is lockFocus main thread specific?
  • Index(es):
    • Date
    • Thread