Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
- Subject: Debugging kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
- From: Jonathan Taylor <email@hidden>
- Date: Thu, 05 Sep 2013 11:21:04 +0100
Can anybody help me diagnose an error that I see intermittently? The errors are as follows:
Thu Sep 5 10:11:11 Jonathan-Taylors-Mac-Pro.local Spim GUI[34152] <Error>: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region
Thu Sep 5 10:11:11 Jonathan-Taylors-Mac-Pro.local Spim GUI[34152] <Error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
(gdb) continue
Thu Sep 5 10:11:17 Jonathan-Taylors-Mac-Pro.local Spim GUI[34152] <Error>: kCGErrorIllegalArgument: CGSGetRegionBounds : Invalid region
Searching for those terms finds suggestions that this may be associated with updating progress bars from a secondary thread. I still see the error even after removing the only progress bar from my program; I don't know whether the cause is something genuinely associated with progress bars, or whether it's just that it's easy to slip up and update them from a secondary thread, triggering this error.
The error is very intermittent which makes narrowing it down hard, and setting the breakpoint as advised hasn't helped me since there isn't anything of mine in the call stack when the condition is encountered:
#0 0x97a7610a in CGErrorBreakpoint
#1 0x97b0b9e0 in CGSGlobalErrorv
#2 0x978e96d5 in CGSUnionRegionWithRect
#3 0x984ea84c in -[NSRegion addRegion:]
#4 0x984ea69d in -[NSWindow _setNeedsDisplayInRegion:]
#5 0x9843ae86 in -[NSWindow _absorbDeferredNeedsDisplayRegion]
#6 0x98439a54 in -[NSView _sendViewWillDrawInRect:clipRootView:suppressRecursion:]
#7 0x9839c80e in -[NSView displayIfNeeded]
#8 0x98365b64 in -[NSWindow displayIfNeeded]
#9 0x9839707e in _handleWindowNeedsDisplay
#10 0x94f04dd2 in __CFRunLoopDoObservers
#11 0x94ec0ced in __CFRunLoopRun
#12 0x94ec03c4 in CFRunLoopRunSpecific
#13 0x94ec01f1 in CFRunLoopRunInMode
#14 0x92e8ce04 in RunCurrentEventLoopInMode
#15 0x92e8cbb9 in ReceiveNextEventCommon
#16 0x92e8ca3e in BlockUntilNextEventMatchingListInMode
#17 0x9836d595 in _DPSNextEvent
#18 0x9836cdd6 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
#19 0x9832f1f3 in -[NSApplication run]
#20 0x98327289 in NSApplicationMain
#21 0x00002b69 in start at vector.tcc:244
Can anyone advise on anything I can do to help diagnose this? Even something that made it happen much more frequently would be some help, as I might then have more of a chance of narrowing down the cause by disabling chunks of code.
Cheers
Jonny
_______________________________________________
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