There are a number of questions regarding the "wait_fences: failed to receive reply" on this forum already, but none of the proposed solutions work for me (although they did help me to mitigate it).
When my app starts up, I do a reachability check, and if I can't reach the host I'm looking for, I pop up a UIAlertView. Initially I was doing this before I even set up the view controller, but then I learned one of the causes of the "wait_fences" problem is that the responder chain isn't properly set up if you haven't displayed a view yet - so I moved everything down into -viewDidAppear. Basically, this is what I have:
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
// Figure out what the reflections name is, then check to see if it can find it online;
// If it can't, -informUserSiteIsNotReachable is called, below
[self retrieveReflectionByName:self.todaysReflectionName];
[self displayReflectionByName:self.todaysReflectionName];
}
- (void)informUserSiteIsNotReachable
{
SEL messageSelector;
if (NO == [self internetIsReachable]) {
messageSelector = @selector(internetNotAccessible);
} else {
messageSelector = @selector(reflectionsSiteNotAccessible);
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:[Strings alertViewTitleWhenSiteIsUnreachable] message:[Strings performSelector:messageSelector] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:NULL];
[alert show];
[alert release];
}
I can't seem to get rid of the wait_fences problem: any suggestions?