Mailing Lists: Apple Mailing Lists

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

Re: is lockFocus main thread specific?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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



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.