Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
- Subject: Re: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
- From: Graham Cox <email@hidden>
- Date: Thu, 05 Sep 2013 13:00:17 +0200
On 05/09/2013, at 12:37 PM, Jonathan Taylor <email@hidden> wrote:
> Yes, I understand that. I am not aware of doing any drawing from secondary threads, although evidently it appears that somewhere in the program this is happening. My question is whether I can do anything to help track down the problem, because right now I am limited to code reading and/or the very slow process of disabling sections of code (slow because it's an intermittent problem and each time I would need to run for long enough that I can be reasonably sure I would have hit the error if I was going to...).
Do you have any secondary threads? I assume you do.
Any code that touches a view, no matter how indirectly, could be the culprit. Bear in mind that sending any message to any view (controls, etc) might invoke -setNeedsDisplay: which in turn could be the trigger for the problem. Try setting a breakpoint on -setNeedsDisplay: though of course it will be hit a lot, so you might need a clever condition to avoid being overwhelmed. Even one that excludes the main thread might help, e.g. [NSThread currentThread] != [NSThread mainThread]
--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