Crash drawing shadows
Crash drawing shadows
- Subject: Crash drawing shadows
- From: Graham Cox <email@hidden>
- Date: Tue, 22 Jul 2008 12:01:49 +1000
I think I've run into a bug in the low-level shadow drawing code in
Quartz. Can anyone confirm?
This happens pretty repeatably when I have a shadow set for a path
(stroke or fill, doesn't matter) and the destination context is just a
1x1 bitmap image. This crops up as part of my hit-testing code - I
draw the "hit point" to the 1x1 context which only has an alpha
channel, and then test to see if it was set or not. For testing a
single point, a very small area is transformed and drawn to the 1x1
image, so there is a substantial scale factor being applied (in fact
about 10000x). I'm wondering if the low-level shadow rendering code is
somehow running into an unexpected situation with those sorts of
figures? Or maybe it's because my destination "bitmap" is just one
byte and the low-level code isn't bounds checking it? (I'm guessing
that 'sseCGSFill8by1' fills an 8x1 bitmap, so could it be falling off
the edge of the 1x1?)
For simply drawing to the screen, the shadow gets drawn correctly
using exactly the same drawing code - the only difference is the
destination context and the transform applied. Without a shadow, this
hit-testing technique also works fine.
Stack trace:
#0 0x940101fc in sseCGSFill8by1
#1 0x93d89107 in ripl_CreateMask
#2 0x93d8d47f in RIPLayerSymmetricConvolve
#3 0x93d8dc0b in RIPLayerGaussianBlur
#4 0x93da795a in rips_s_BltShape
#5 0x93d74939 in ripc_Render
#6 0x93d7d7c4 in ripc_DrawPath
#7 0x94057a67 in CGContextDrawPath
#8 0x940a5726 in CGContextStrokePath
#9 0x95678b99 in -[NSBezierPath(NSBezierPathDevicePrimitives)
_doUserPathWithOp:inContext:]
#10 0x95678cb2 in -[NSBezierPath stroke]
cheers, Graham
_______________________________________________
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