سؤال

Whenever I click a certain button, the app always dies and I'm sent to:

int main(int argc, char *argv[])
{
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    THIS LINE ==> int retVal = UIApplicationMain(argc, argv, nil, nil);
    [pool release];
    return retVal;
}

For those who are familiar, you know that I didn't write this code. I don't know how to find out where my error is!

Also, the output shows this:

2011-10-27 21:03:17.690 My Program[55441:207] Unbalanced calls to begin/end appearance transitions for <UITabBarController: 0x68181f0>.
(lldb) 

I don't know where to look short of commenting out code line by line until I find the issue. Any suggestions?

هل كانت مفيدة؟

المحلول 2

on the button click a new UIView is pushed into the Window. That view's .xib had linkage that was bad (linked to an IBOutlet that didn't exist in code anymore because it was renamed).

I set up the correct linkage in Interface Builder and I no longer got the error. I wish xcode would at least tell you there's a problem with one of your .xib files.

PART 2

Shortly after that fix I was getting this error again. After searching the web for a bit, I found that it could be related to a memory leak so I ran the Project->Analyze tool. When I fixed Xcode's suggestions, everything ran fine.

نصائح أخرى

You are likely running the fact that Xcode 4.2 does not show stack traces most of the time. Check this SO post.

Xcode 4.2 debug doesn't symbolicate stack call

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top