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.