Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6100061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:20:36+00:00 2026-05-23T13:20:36+00:00

I get this exception when trying to save my context: unrecognized selector sent to

  • 0

I get this exception when trying to save my context:

unrecognized selector sent to instance 0x5937b60

I have a similar code for another UITableViewController, that’s working fine. I compared both to make sure that I’m doing things the same way and at first sight, they look almost identical. Strange is that after throwing the exception my application does save the context. When I re-run it, I can see the changes done to my model.

I built all my interface with code (no IB).

I read that this problem normally doesn’t have anything with CoreData trying to save but rather with some other delegate sending messages to the context that this can’t understand. I am clueless where that’s actually happening.

The stack looks like this:

0   CoreFoundation                      0x00fbd5a9 __exceptionPreprocess + 185
1   libobjc.A.dylib                     0x01111313 objc_exception_throw + 44
2   CoreFoundation                      0x00fbf0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3   CoreFoundation                      0x00f2e966 ___forwarding___ + 966
4   CoreFoundation                      0x00f2e522 _CF_forwarding_prep_0 + 50
5   Foundation                          0x007aa669 _nsnote_callback + 145
6   CoreFoundation                      0x00f959f9 __CFXNotificationPost_old + 745
7   CoreFoundation                      0x00f1493a _CFXNotificationPostNotification + 186
8   Foundation                          0x007a020e -[NSNotificationCenter postNotificationName:object:userInfo:] + 134
9   CoreData                            0x00d295b9 -[NSManagedObjectContext(_NSInternalAdditions) _didSaveChanges] + 1513
10  CoreData                            0x00d2388a -[NSManagedObjectContext save:] + 522
11  TimeManager                         0x0000fe9d -[WorkTimeRootViewController viewController:didFinishWithSave:] + 253
12  TimeManager                         0x00012b73 -[AddWorkTimeViewController save:] + 83
13  UIKit                               0x000384fd -[UIApplication sendAction:to:from:forEvent:] + 119
14  UIKit                               0x0024acc3 -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 156
15  UIKit                               0x000384fd -[UIApplication sendAction:to:from:forEvent:] + 119
16  UIKit                               0x000c8799 -[UIControl sendAction:to:forEvent:] + 67
17  UIKit                               0x000cac2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527
18  UIKit                               0x000c97d8 -[UIControl touchesEnded:withEvent:] + 458
19  UIKit                               0x0005cded -[UIWindow _sendTouchesForEvent:] + 567
20  UIKit                               0x0003dc37 -[UIApplication sendEvent:] + 447
21  UIKit                               0x00042f2e _UIApplicationHandleEvent + 7576
22  GraphicsServices                    0x011f6992 PurpleEventCallback + 1550
23  CoreFoundation                      0x00f9e944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
24  CoreFoundation                      0x00efecf7 __CFRunLoopDoSource1 + 215
25  CoreFoundation                      0x00efbf83 __CFRunLoopRun + 979
26  CoreFoundation                      0x00efb840 CFRunLoopRunSpecific + 208
27  CoreFoundation                      0x00efb761 CFRunLoopRunInMode + 97
28  GraphicsServices                    0x011f51c4 GSEventRunModal + 217
29  GraphicsServices                    0x011f5289 GSEventRun + 115
30  UIKit                               0x00046c93 UIApplicationMain + 1160
31  TimeManager                         0x00001c79 main + 121
32  TimeManager                         0x00001bf5 start + 53

This is the method where the application crashes:

- (void)viewController:(id)controller didFinishWithSave:(BOOL)save
{
    if (save) 
    {
        NSNotificationCenter *dnc = [NSNotificationCenter defaultCenter];
        [dnc addObserver:self selector:@selector(addControllerDidSave:) name:NSManagedObjectContextDidSaveNotification object:self.addingManagedObjectContext];

        NSError *error;
        if (![self.addingManagedObjectContext save:&error]) // it crashes here!
        {
            NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
            exit(-1);  // Fail
        }

        [dnc removeObserver:self name:NSManagedObjectContextDidSaveNotification object:self.addingManagedObjectContext];
    }

    self.addingManagedObjectContext = nil;

    [self dismissModalViewControllerAnimated:YES];
}

I don’t know which more code I should attach, since I’m not sure what’s causing the problem.
Any help will be REALLY appreciated!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:20:36+00:00Added an answer on May 23, 2026 at 1:20 pm

    Triple check the spelling / case of your selectors. Looks to be as if you are maybe adding an observer for a method that doesn’t actually exist, and because XCode can’t validate selectors for you, often there is a silly typo that causes these sorts of crashes.

    Also – triple check that if the method expects an object, there is a : at the end of the selector, and equally if the method doesn’t expect an object, ensure there isn’t one. The : is significant.

    Check ones other than the code you have shown here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In this code I'm trying to: get a bitmap from an ImageView save it
When trying to save an uploaded file, I get this error and are having
Today I have been trying to get an image to save into a database,
I get this exception on my Windows 7 64bit in application running in VS
why do i get this exception? Map myHash = null myHash = (HashMap)Collections.synchronizedMap(new HashMap());
I'm using ant to generate javadocs, but get this exception over and over -
How can I get around this exception? Dim imagepathlit As Literal = DownloadsRepeater.FindControl(imagepathlit) imagepathlit.Text
I get this error:- You have an error in your SQL syntax; check the
I am trying to get the Silverlight control for Bing Maps to save an
I use the code below and get this error InvalidDataExcption: The magic number in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.