Re: FYI: Crash bug in the Color Sampler sample on Apple's site
Re: FYI: Crash bug in the Color Sampler sample on Apple's site
- Subject: Re: FYI: Crash bug in the Color Sampler sample on Apple's site
- From: John Randolph <email@hidden>
- Date: Fri, 26 Sep 2003 10:57:18 -0700
On Sep 26, 2003, at 9:14 AM, publiclook wrote:
Apple's Color Sampler sample has a crash bug in it. I think it is
located in either Cocoa samples or Graphics2D.
Run the pre-build executable. Click and and drag the mouse from within
the image view to the upper right portion of the menu bar where the
sound volume and other controls normally reside. The Color Sampler
application will reliably crash. The fix to the example is to test
whether the mouse in in the application's window before attempting to
get pixel data. Still, I wonder why the application _crashes_ instead
of just displaying garbage. There must be some attempt to access
memory outside the application's protected space...
Any thoughts or ideas ?
It's crashing because -initWithFocusedViewRect: doesn't do any checking
of the rect I pass it to make sure it lies within the bounds of the
current graphics context. I'd consider this a bug in my code, not in
the framework.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.