0

I am making an app for a project that displays a table of song titles and allows you to click on them to see more details about it. The name of the project is SpinCity.

Below is the thread exception error:

//  main.m
//  SpinCity

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

The console output is:

2016-03-02 11:25:15.036 SpinCity[32877:2988350] -[MasterViewController topViewController]: unrecognized selector sent to instance 0x7f975a6a47d0
2016-03-02 11:25:15.038 SpinCity[32877:2988350] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MasterViewController topViewController]: unrecognized selector sent to instance 0x7f975a6a47d0'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010712de65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000106ba6deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010713648d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010708390a ___forwarding___ + 970
    4   CoreFoundation                      0x00000001070834b8 _CF_forwarding_prep_0 + 120
    5   SpinCity                            0x00000001066a0acb -[AppDelegate application:didFinishLaunchingWithOptions:] + 235
    6   UIKit                               0x00000001074d11f1 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
    7   UIKit                               0x00000001074d2397 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
    8   UIKit                               0x00000001074d8cc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760
    9   UIKit                               0x00000001074d5e7b -[UIApplication workspaceDidEndTransaction:] + 188
    10  FrontBoardServices                  0x0000000109ea9754 -[FBSSerialQueue _performNext] + 192
    11  FrontBoardServices                  0x0000000109ea9ac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    12  CoreFoundation                      0x0000000107059a31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    13  CoreFoundation                      0x000000010704f95c __CFRunLoopDoSources0 + 556
    14  CoreFoundation                      0x000000010704ee13 __CFRunLoopRun + 867
    15  CoreFoundation                      0x000000010704e828 CFRunLoopRunSpecific + 488
    16  UIKit                               0x00000001074d57cd -[UIApplication _run] + 402
    17  UIKit                               0x00000001074da610 UIApplicationMain + 171
    18  SpinCity                            0x00000001066a1fff main + 111
    19  libdyld.dylib                       0x000000010986992d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

Any ideas of how to resolve this?

Thank you.

B. Steib
  • 1
  • 1

1 Answers1

0

Pretty clear why it is crashing:

'-[MasterViewController topViewController]: unrecognized selector sent to instance 0x7f975a6a47d0' *** First throw call stack:

And the call stack shows that you are attempting to call that method in your application:didFinishLaunchingWithOptions: method.

bbum
  • 162,346
  • 23
  • 271
  • 359