This is, because BTRPopUpButton causes “-setMenu:” to be called within “-initWithFrame:” (via BTRPopupButtonCommonInit() and [self addObserver:self forKeyPath:@"menu.delegate" options:NSKeyValueObservingOptionNew context:NULL];) and it in turn calls self.menu, which is not set yet and calls through to “-setMenu:” again, resulting in an infinite loop.
Apple strongly recommends to only use ivars directly in the -init… path for this exact reason.