• 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
Re: NSDocumentTitlebarPopoverViewController zombie on Yosemite
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDocumentTitlebarPopoverViewController zombie on Yosemite


  • Subject: Re: NSDocumentTitlebarPopoverViewController zombie on Yosemite
  • From: Martin Wierschin <email@hidden>
  • Date: Wed, 10 Jun 2015 15:13:50 -0700

I filed this myself some time ago, and my report was marked as a duplicate of rdar://19790930 .

I worked around this crasher by swizzling -[NSDocumentTitlebarPopoverViewController invalidate] with something like this:

- (void) invalidate
{
	// This is essentially [self valueForKey:@"view"] but without calling the -view accessor method, to avoid potential (re)loading
	Ivar viewIvar = class_getInstanceVariable( [NSViewController class], "view" );
	if( NULL != viewIvar ) {
		ptrdiff_t viewIvarOffset = ivar_getOffset(viewIvar);
		NSView** viewPtr = (void*)self + viewIvarOffset;
		NSView* myView = *viewPtr;

		// if the view's delegate is the receiver, set it to nil to clear it
		id delegate = [myView performSelectorIfResponds:@selector(delegate)];
		if( self == delegate ) {
			[myView performSelectorIfResponds:@selector(setDelegate:) withObject:nil];
		}
	}

	// call super's original method implementation
	NSDocumentTitlebarPopoverViewController_invalidateImp(self, _cmd);
}

@end


I hope that helps,

~Martin Wierschin


>>> After enabling Zombie Objects, I get the following in the console:
>>> 2015-05-28 14:19:58.291 MyApp[23684:2561441] *** -[NSDocumentTitlebarPopoverViewController isKindOfClass:]: message sent to deallocated instance 0x600000146f60

>> We saw the same issue starting with 10.10.3 and continuing through current 10.10.4 builds. Write up a radar and reference radar://problem/20368338 as a duplicate instance.

> Good to know. Duplicate radar filed, rdar://problem/21145343.


_______________________________________________

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: Custom UTI in Preference Pane
  • Next by Date: Playground
  • Previous by thread: Custom UTI in Preference Pane
  • Next by thread: Playground
  • Index(es):
    • Date
    • Thread