objective c - Why do I get a Build Error on Tab Bar Tap? -


i creating iphone ios application. have 3 tabs in tab bar controller. when tap on third tab on tab bar controller in ios simulator, ios simulator disappears , shown main.m file green highlight over:

int retval = uiapplicationmain(argc, argv, nil, nil); 

the build error states that: thread 1: program received signal: sigabrt

if @ build output window @ bottom of screen, see following text:

gnu gdb 6.3.50-20050815 (apple version gdb-1518) (sat feb 12 02:52:12 utc 2011) copyright 2004 free software foundation, inc. gdb free software, covered gnu general public license, , welcome change and/or distribute copies of under conditions. type "show copying" see conditions. there absolutely no warranty gdb.  type "show warranty" details. gdb configured "x86_64-apple-darwin".attaching process 4283. **2011-07-03 12:45:37.114 cypher bot[4283:207] *** terminating app due uncaught exception 'nsunknownkeyexception', reason: '[<uiviewcontroller 0x4e1b190> setvalue:forundefinedkey:]: class not key value coding-compliant key portraitview.' *** call stack @ first throw: (         0   corefoundation                      0x00dce5a9 __exceptionpreprocess + 185         1   libobjc.a.dylib                     0x00f22313 objc_exception_throw + 44         2   corefoundation                      0x00dce4e1 -[nsexception raise] + 17         3   foundation                          0x007a0677 _nssetusingkeyvaluesetter + 135         4   foundation                          0x007a05e5 -[nsobject(nskeyvaluecoding) setvalue:forkey:] + 285         5   uikit                               0x0021c30c -[uiruntimeoutletconnection connect] + 112         6   corefoundation                      0x00d448cf -[nsarray makeobjectsperformselector:] + 239         7   uikit                               0x0021ad23 -[uinib instantiatewithowner:options:] + 1041         8   uikit                               0x0021cab7 -[nsbundle(uinsbundleadditions) loadnibnamed:owner:options:] + 168         9   uikit                               0x000d2628 -[uiviewcontroller _loadviewfromnibnamed:bundle:] + 70         10  uikit                               0x000d0134 -[uiviewcontroller loadview] + 120         11  uikit                               0x000d000e -[uiviewcontroller view] + 56         12  uikit                               0x000e2f54 -[uitabbarcontroller transitionfromviewcontroller:toviewcontroller:transition:shouldsetselected:] + 120         13  uikit                               0x000e1aaa -[uitabbarcontroller transitionfromviewcontroller:toviewcontroller:] + 64         14  uikit                               0x000e38a2 -[uitabbarcontroller _setselectedviewcontroller:] + 263         15  uikit                               0x000e3711 -[uitabbarcontroller _tabbaritemclicked:] + 352         16  uikit                               0x000204fd -[uiapplication sendaction:to:from:forevent:] + 119         17  uikit                               0x00222ce6 -[uitabbar _sendaction:withevent:] + 422         18  uikit                               0x000204fd -[uiapplication sendaction:to:from:forevent:] + 119         19  uikit                               0x000b0799 -[uicontrol sendaction:to:forevent:] + 67         20  uikit                               0x000b2c2b -[uicontrol(internal) _sendactionsforevents:withevent:] + 527         21  uikit                               0x000b0750 -[uicontrol sendactionsforcontrolevents:] + 49         22  uikit                               0x000204fd -[uiapplication sendaction:to:from:forevent:] + 119         23  uikit                               0x000b0799 -[uicontrol sendaction:to:forevent:] + 67         24  uikit                               0x000b2c2b -[uicontrol(internal) _sendactionsforevents:withevent:] + 527         25  uikit                               0x000b17d8 -[uicontrol touchesended:withevent:] + 458         26  uikit                               0x00044ded -[uiwindow _sendtouchesforevent:] + 567         27  uikit                               0x00025c37 -[uiapplication sendevent:] + 447         28  uikit                               0x0002af2e _uiapplicationhandleevent + 7576         29  graphicsservices                    0x01007992 purpleeventcallback + 1550         30  corefoundation                      0x00daf944 __cfrunloop_is_calling_out_to_a_source1_perform_function__ + 52         31  corefoundation                      0x00d0fcf7 __cfrunloopdosource1 + 215         32  corefoundation                      0x00d0cf83 __cfrunlooprun + 979         33  corefoundation                      0x00d0c840 cfrunlooprunspecific + 208         34  corefoundation                      0x00d0c761 cfrunloopruninmode + 97         35  graphicsservices                    0x010061c4 gseventrunmodal + 217         36  graphicsservices                    0x01006289 gseventrun + 115         37  uikit                               0x0002ec93 uiapplicationmain + 1160         38  cypher bot                          0x00002889 main + 121         39  cypher bot                          0x00002805 start + 53         40  ???                                 0x00000001 0x0 + 1 ) terminate called after throwing instance of 'nsexception' sharedlibrary apply-load-rules current language:  auto; objective-c (gdb)** > 

the changes made third view controller before were:

  1. add support landscape
  2. add memory warning event
  3. add feature allows open sms app (i have deleted that, , ran project nothing happened)

edit: have included header file:

#import <uikit/uikit.h>   @interface thirdviewcontroller : uiviewcontroller {     iboutlet uiview *landscapeview;     iboutlet uiview *portraitview;  }  @property (nonatomic, retain) iboutlet uiview *landscapeview;  @property (nonatomic, retain) iboutlet uiview *portraitview; @end 

the @properties used @synthesize , there no errors or warnings in project.

edit 2: have removed related portraitview , landscapeview , when run , tap more, following:

**terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'could not load nib in bundle: 'nsbundle </users/spencer/library/application support/iphone simulator/4.3.2/applications/1e0a4c15-2143-442d-a8fc-4ae36cfc90e4/cypher bot.app> (loaded)' name 'thirdviewcontroller.xib''** 

what doing wrong? how come can't tap on third tab?

any appreciated! thanks!

it appears nib file tries bind outlet named portraitview on uiviewcontroller, uiviewcontroller not have such property. i'd guess need go ib , change class on view controller whichever custom uiviewcontroller subclass in application supposed be.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -