Sigabrt???

Discussion in 'iOS Programming' started by dbramhall, Aug 28, 2011.

  1. dbramhall macrumors newbie

    Joined:
    Aug 1, 2011
    Location:
    England, UK
    #1
    I am developing an iOS application (http://affogato.visioa.com/) that implements a tab bar controller, navigation controller and a tableview controller and each time I run my application, I get: "Thread 1: Program recieved signal: "SIGABRT". Could anyone shed any light as to why I am getting this and how to correct it?
    *
    Below is the console:
    *
    2011-08-28 13:13:57.070 Affogato[16469:b303] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "CoffeesView" nib but didn't get a UITableView.'
    *** Call stack at first throw:
    (
    0** CoreFoundation********************* 0x00dc95a9 __exceptionPreprocess + 185
    1** libobjc.A.dylib******************** 0x00f1d313 objc_exception_throw + 44
    2** CoreFoundation********************* 0x00d81ef8 +[NSException raise:format:arguments:] + 136
    3** CoreFoundation********************* 0x00d81e6a +[NSException raise:format:] + 58
    4** UIKit****************************** 0x00224e9b -[UITableViewController loadView] + 275
    5** UIKit****************************** 0x000cb00e -[UIViewController view] + 56
    6** UIKit****************************** 0x000c9482 -[UIViewController contentScrollView] + 42
    7** UIKit****************************** 0x000d9f25 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 48
    8** UIKit****************************** 0x000d8555 -[UINavigationController _layoutViewController:] + 43
    9** UIKit****************************** 0x000d9870 -[UINavigationController _startTransition:fromViewController:toViewController:] + 524
    10* UIKit****************************** 0x000d432a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
    11* UIKit****************************** 0x001ef2e9 -[UILayoutContainerView layoutSubviews] + 226
    12* QuartzCore************************* 0x016b3a5a -[CALayer layoutSublayers] + 181
    13* QuartzCore************************* 0x016b5ddc CALayerLayoutIfNeeded + 220
    14* QuartzCore************************* 0x0165b0b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
    15* QuartzCore************************* 0x0165c294 _ZN2CA11Transaction6commitEv + 292
    16* UIKit****************************** 0x0001d9c9 -[UIApplication _reportAppLaunchFinished] + 39
    17* UIKit****************************** 0x0001de83 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 690
    18* UIKit****************************** 0x00028617 -[UIApplication handleEvent:withNewEvent:] + 1533
    19* UIKit****************************** 0x00020abf -[UIApplication sendEvent:] + 71
    20* UIKit****************************** 0x00025f2e _UIApplicationHandleEvent + 7576
    21* GraphicsServices******************* 0x01002992 PurpleEventCallback + 1550
    22* CoreFoundation********************* 0x00daa944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    23* CoreFoundation********************* 0x00d0acf7 __CFRunLoopDoSource1 + 215
    24* CoreFoundation********************* 0x00d07f83 __CFRunLoopRun + 979
    25* CoreFoundation********************* 0x00d07840 CFRunLoopRunSpecific + 208
    26* CoreFoundation********************* 0x00d07761 CFRunLoopRunInMode + 97
    27* UIKit****************************** 0x0001d7d2 -[UIApplication _run] + 623
    28* UIKit****************************** 0x00029c93 UIApplicationMain + 1160
    29* Affogato*************************** 0x00001ed9 main + 121
    30* Affogato*************************** 0x00001e55 start + 53
    31* ???******************************** 0x00000001 0x0 + 1
    )
    terminate called throwing an exception
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Nibs are usually not very useful when your view controller is a UITableViewController. The error is

    '-[UITableViewController loadView] loaded the "CoffeesView" nib but didn't get a UITableView.'

    UITableViewController creates its own tableview in code. It also expects that its tableview will be fullscreen (except for a navigation controller or tabbarcontroller). If you use a nib with a UITableViewController it can only have a table in it and the table must be set as the view controller's view outlet. This is what the error means; you haven't set the view outlet to be a table view.

    If you want to load a nib that has other views in it then you need to use a UIViewController subclass to own the nib, not a UITableViewController.
     

Share This Page