2

So im getting this strange sigabrt exception, I added an all exception breakpoint and the line I'm getting the exception on is this:

[self performSegueWithIdentifier: @"SolveSound" sender: self];

and I can't understand why would it throw an exception, I made a connection (segue ) to the next view and named it SolveSound.

If anymore code is needed just tell me.

2013-05-19 23:02:30.785 Game[17957:c07] -[SoundViewController _setViewDelegate:]: unrecognized selector sent to instance 0x8253a50 2013-05-19 23:02:36.382 Game[17957:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SoundViewController _setViewDelegate:]: unrecognized selector sent to instance 0x8253a50' * First throw call stack: (0x15c4012 0x13e9e7e 0x164f4bd 0x15b3bbc 0x15b394e 0x412f7c 0x40f440 0xe175be 0xe170e7 0xe41b58 0x54b019 0x13fd663 0x15bf45a 0x549b1c 0x40e7e7 0x40edc8 0x40eff8 0x40f232 0x40f4da 0x4268e5 0x4269cb 0x426c76 0x426d71 0x42789b 0x427e93 0xe9d83f7 0x427a88 0x783e63 0x775b99 0x40fdd2 0xe9d012c 0x4b53 0x3dd285 0x3dd4ed 0xde75b3 0x1583376 0x1582e06 0x156aa82 0x1569f44 0x1569e1b 0x24107e3 0x2410668 0x32dffc 0x262d 0x2555) libc++abi.dylib: terminate called throwing an exception (lldb)

by the way this is what I'm getting in the output.

EDIT:added SoundViewController code:

@interface SoundViewController ()

@end

@implementation SoundViewController
{
    SoundItem *currentSound;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.


}
- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];

    [self.answerTextField becomeFirstResponder];
}

- (BOOL)textField:(UITextField *)theTextField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
    NSString *newText = [theTextField.text stringByReplacingCharactersInRange:range withString:string];
    if ([newText length] > 0) {
        self.checkButton.enabled = YES;
    } else {
        self.checkButton.enabled = NO;
    }
    return YES;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end

EDIT:added stack trace

2013-05-19 23:42:33.900 Game[18590:c07] Stack trace: (
    0   CoreFoundation                      0x015c402e __exceptionPreprocess + 206
    1   libobjc.A.dylib                     0x013e9e7e objc_exception_throw + 44
    2   CoreFoundation                      0x0164f4bd -[NSObject(NSObject) doesNotRecognizeSelector:] + 253
    3   CoreFoundation                      0x015b3bbc ___forwarding___ + 588
    4   CoreFoundation                      0x015b394e _CF_forwarding_prep_0 + 14
    5   UIKit                               0x00412f7c +[UIViewController setViewController:forView:] + 40
    6   UIKit                               0x0040f440 -[UIViewController setView:] + 521
    7   Foundation                          0x00e175be _NSSetUsingKeyValueSetter + 82
    8   Foundation                          0x00e170e7 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
    9   Foundation                          0x00e41b58 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
    10  UIKit                               0x0054b019 -[UIRuntimeOutletConnection connect] + 106
    11  libobjc.A.dylib                     0x013fd663 -[NSObject performSelector:] + 62
    12  CoreFoundation                      0x015bf45a -[NSArray makeObjectsPerformSelector:] + 314
    13  UIKit                               0x00549b1c -[UINib instantiateWithOwner:options:] + 1327
    14  UIKit                               0x0040e7e7 -[UIViewController _loadViewFromNibNamed:bundle:] + 280
    15  UIKit                               0x0040edc8 -[UIViewController loadView] + 302
    16  UIKit                               0x0040eff8 -[UIViewController loadViewIfRequired] + 73
    17  UIKit                               0x0040f232 -[UIViewController view] + 33
    18  UIKit                               0x0040f4da -[UIViewController contentScrollView] + 36
    19  UIKit                               0x004268e5 -[UINavigationController _computeAndApplyScrollContentInsetDeltaForViewController:] + 36
    20  UIKit                               0x004269cb -[UINavigationController _layoutViewController:] + 43
    21  UIKit                               0x00426c76 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 254
    22  UIKit                               0x00426d71 -[UINavigationController _startTransition:fromViewController:toViewController:] + 72
    23  UIKit                               0x0042789b -[UINavigationController _startDeferredTransitionIfNeeded:] + 386
    24  UIKit                               0x00427e93 -[UINavigationController pushViewController:transition:forceImmediate:] + 1030
    25  UIKit                               0x0ab343f7 -[UINavigationControllerAccessibility(SafeCategory) pushViewController:transition:forceImmediate:] + 71
    26  UIKit                               0x00427a88 -[UINavigationController pushViewController:animated:] + 62
    27  UIKit                               0x00783e63 -[UIStoryboardPushSegue perform] + 1111
    28  UIKit                               0x00775b99 -[UIStoryboardSegueTemplate _perform:] + 174
    29  UIKit                               0x0040fdd2 -[UIViewController performSegueWithIdentifier:sender:] + 72
    30  UIKit                               0x0ab2c12c -[UIViewControllerAccessibility(SafeCategory) performSegueWithIdentifier:sender:] + 63
    31  Game                                0x00004e63 -[PickSoundViewController tableView:didSelectRowAtIndexPath:] + 339
    32  UIKit                               0x003dd285 -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1194
    33  UIKit                               0x003dd4ed -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 201
    34  Foundation                          0x00de75b3 __NSFireDelayedPerform + 380
    35  CoreFoundation                      0x01583376 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
    36  CoreFoundation                      0x01582e06 __CFRunLoopDoTimer + 534
    37  CoreFoundation                      0x0156aa82 __CFRunLoopRun + 1810
    38  CoreFoundation                      0x01569f44 CFRunLoopRunSpecific + 276
    39  CoreFoundation                      0x01569e1b CFRunLoopRunInMode + 123
    40  GraphicsServices                    0x024107e3 GSEventRunModal + 88
    41  GraphicsServices                    0x02410668 GSEventRun + 104
    42  UIKit                               0x0032dffc UIApplicationMain + 1211
    43  Game                                0x00002824 main + 164
    44  Game                                0x00002735 start + 53
)
Eli Braginskiy
  • 2,867
  • 5
  • 31
  • 46
  • Are are you setting viewDelegate property in SoundViewController somewhere ? if you are try comment out that line – ila May 19 '13 at 20:15
  • @ila I'm not setting it anywhere, i added the code for SoundViewController. – Eli Braginskiy May 19 '13 at 20:21
  • did set SoundViewController class for UIView, if you did set it for File's owner – ila May 19 '13 at 20:26
  • `-[SoundViewController _setViewDelegate:]: unrecognized selector sent to instance 0x8253a50'` -- This means that somewhere, directly or indirectly, you're performing `setViewDelegate` (or assigning to property viewDelegate`) on a SoundViewController. Look for somewhere where you're setting `viewDelegate` and NSLog the object being used as the receiver (not the value being set). – Hot Licks May 19 '13 at 20:27
  • 1
    Also, add an exception breakpoint, and see [this answer](http://stackoverflow.com/a/12268397/581994) for how to get a proper exception trace. – Hot Licks May 19 '13 at 20:30
  • @ila i didn't quite get what you mean, my view Class is set to SoundViewController. – Eli Braginskiy May 19 '13 at 20:37
  • @Hot Licks, i searched in the code, I don't preform setViewDelegate anywhere. – Eli Braginskiy May 19 '13 at 20:38
  • Somewhere you're using a SoundViewController pointer as the "target" of a "message" when you should be using a different object. – Hot Licks May 19 '13 at 20:38
  • (Did you check for "viewDelegate"? And keep in mind that the call may be internal to some system code, where you passed in the wrong object. Which is why you need to get that symbolic exception trace.) – Hot Licks May 19 '13 at 20:39
  • @HotLicks added stack trace. – Eli Braginskiy May 19 '13 at 20:43
  • 1
    See for a view Controller the files owner should be set to the SoundViewController. Go into storyBoard or xib click on the sound view controller. Now click on files owner, set the custom class to SoundViewController. now click on topmost view of the controller , make sure custom class for that is UiView – ila May 19 '13 at 20:45
  • @ila after i set my topmost View to UIView i got this: Uncaught exception: [ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key answerTextField. – Eli Braginskiy May 19 '13 at 20:54
  • 1
    Did u also set files owner to SoundViewController ? – ila May 19 '13 at 20:56
  • @ila ok i figured the problem, my button and textfield was connected to another file. thanks so much. – Eli Braginskiy May 19 '13 at 20:57

0 Answers0