Re: Closing window on Yosemite crashes (isFlipped)
Re: Closing window on Yosemite crashes (isFlipped)
- Subject: Re: Closing window on Yosemite crashes (isFlipped)
- From: Graham Cox <email@hidden>
- Date: Fri, 07 Nov 2014 09:40:41 +1100
Looks like an object is not removing itself as an observer of window notifications prior to deallocation. The notification center holds on to weak references, so these can become stale if not purposely removed, usually by a call to -removeObserver: as part of the -dealloc method (with ARC you would still need a -dealloc method, just not call [super dealloc]). But dealloc might be too late anyway.
With a bunch of related objects, such as a document, a window and the views in it, the exact order of destruction can mean that correctly untangling things from the notification center becomes tricky, and also may change from one OS release to another. Forgetting to -removeObserver: (or doing it in the wrong place) might work due to destruction order, then crash in a different OS version. I've run into this a few times. Usually finding where I'm calling -removeObserver: and making that happen earlier has led to a solution.
--Graham
On 31 Oct 2014, at 3:26 am, Fritz Anderson <email@hidden> wrote:
>> Application Specific Information:
>> objc_msgSend() selector name: isFlipped
>> Performing @selector(_close:) from sender _NSThemeCloseWidget 0x61000019c560
>>
>> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
>> 0 libobjc.A.dylib 0x00007fff897530dd objc_msgSend + 29
>> 1 com.apple.AppKit 0x00007fff8afb7d79 -[NSView convertRect:toView:] + 212
>> 2 com.apple.AppKit 0x00007fff8b094b0e -[NSView(NSInternal) _updateLayerTreeRenderer] + 935
>> 3 com.apple.AppKit 0x00007fff8b1c1548 -[NSView(NSInternal) _pauseLayerTreeRenderer] + 144
>> 4 com.apple.CoreFoundation 0x00007fff830bacbc __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
>> 5 com.apple.CoreFoundation 0x00007fff82fac1b4 _CFXNotificationPost + 3140
>> 6 com.apple.Foundation 0x00007fff903acea1 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
>> 7 com.apple.AppKit 0x00007fff8b0c70f4 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 4151
_______________________________________________
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