On Sat, 2006-06-10 at 23:17 +0200, Mark Wielaard wrote: > Hi, > > I was seeing deadlocks in some cases with ComponentGraphics.drawImage(). > ComponentGraphics takes the gdk lock and then calls super.drawImage(). > But in some cases when the image isn't a BufferedImage CairoGraphics > would recurse into drawImage() again. And since the gdk lock isn't > reentrant that would cause a deadlock. There was a second problem if the > image was the error image, in that case it wouldn't have a ImageProducer > and later on in CairoGraphics.drawImage() an Exception would be thrown. > In that case the gdk lock would never be released. To prevent against > such situations this patch also moves all operations that have to > operate with the gdk lock held into a try-finally block to make sure the > lock is always released.
Looks OK. But on a seperate but related note, could we move that "error image" stuff to a seperate dummy class instead though? /Sven
