• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSView trackingAreas and fast enumeration mutation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSView trackingAreas and fast enumeration mutation


  • Subject: NSView trackingAreas and fast enumeration mutation
  • From: Gideon King <email@hidden>
  • Date: Fri, 22 Jul 2011 19:16:34 +1000

Hi All, I'm not sure how to track down this issue. A few users of my application have reported the following crash.

0 CoreFoundation 0x00007fff8045e7b4 __exceptionPreprocess + 180
1 libobjc.A.dylib 0x00007fff8354cf03 objc_exception_throw + 45
2 CoreFoundation 0x00007fff804b65bf __NSFastEnumerationMutationHandler + 303
3 AppKit 0x00007fff853df660 -[NSView trackingAreas] + 271
4 AppKit 0x00007fff85434025 -[NSView(NSInternal) _updateTrackingAreas] + 249
5 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
6 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
7 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
8 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
9 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
10 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
11 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
12 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
13 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
14 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
15 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
16 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
17 CoreFoundation 0x00007fff803d8d6e CFArrayApplyFunction + 222
18 AppKit 0x00007fff85434413 -[NSView(NSInternal) _updateTrackingAreas] + 1255
19 AppKit 0x00007fff85433e28 _handleInvalidCursorRectsNote + 451
20 CoreFoundation 0x00007fff8041db37 __CFRunLoopDoObservers + 519
21 CoreFoundation 0x00007fff803f9464 __CFRunLoopRun + 468
22 CoreFoundation 0x00007fff803f8dbf CFRunLoopRunSpecific + 575
23 HIToolbox 0x00007fff876f17ee RunCurrentEventLoopInMode + 333
24 HIToolbox 0x00007fff876f15f3 ReceiveNextEventCommon + 310
25 HIToolbox 0x00007fff876f14ac BlockUntilNextEventMatchingListInMode + 59
26 AppKit 0x00007fff85408eb2 _DPSNextEvent + 708
27 AppKit 0x00007fff85408801 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155
28 AppKit 0x00007fff853ce68f -[NSApplication run] + 395
29 OmniAppKit 0x000000010056f774 -[OAApplication run] + 132
30 AppKit 0x00007fff853c73b0 NSApplicationMain + 364
31 NovaMind5 0x0000000100001888 start + 52

So it appears that while it is running the "trackingAreas" method of NSView, I must be adding or removing a tracking area.

I looked in my code and found:
- I have some views that call addTrackingArea in initWithFrame:
- I have a controller that creates a view and then calls addTrackingArea on that view.
- I have an NSControl subclass that is instantiated in a nib and calls addTrackingArea in its awakeFromNib.

I never call removeTrackingArea or updateTrackingAreas in my code, and have not overridden any of the tracking area related methods in my views. I have not been able to reproduce the problem in a test environment, so don't have anything to set a breakpoint on.

I'm wondering is any of the tracking rect or cursor rect methods might be using tracking areas behind the scenes, and maybe there is some time when I can't add, remove or invalidate them? I have looked through my code for anything suspicious there, and haven't found anything, but then I'm not exactly sure what I'm looking for. The crashes I have seen so far have all been on Snow Leopard, but given the youth of Lion I can't rule out it being present there too.

Any debugging suggestions would be very welcome.



Regards

Gideon




_______________________________________________

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

  • Prev by Date: Re: Timing some code execution outside Instruments
  • Next by Date: NSDecimalNumber converted to NSNumber
  • Previous by thread: Re: Determine architecture of a running application
  • Next by thread: NSDecimalNumber converted to NSNumber
  • Index(es):
    • Date
    • Thread