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 6327845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:21:09+00:00 2026-05-24T17:21:09+00:00

Getting error: *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSNull isEqualToString:]: unrecognized

  • 0

Getting error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull isEqualToString:]: unrecognized selector sent to instance'…

The SIGABRT came on the else cell.textLabel.text = @"Blank"; line of:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {UITableViewCell *cell = nil;
    static NSString *CellIdentifier = @"Cell";
    cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
         cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
    }
     NSManagedObjectContext *context = [self managedObjectContext];
     NSEntityDescription *entity = [NSEntityDescription entityForName:@"Pattern" inManagedObjectContext:context];
 // Edit the sort method.
     NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"patternName" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
      NSArray *sortDescriptors = [[[NSArray alloc] initWithObjects:sortDescriptor, nil] autorelease];

     NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
     [fetchRequest setSortDescriptors:sortDescriptors];
     [fetchRequest setEntity:entity];    
     _patterns = [context executeFetchRequest:fetchRequest error:nil];
     [fetchRequest release];
     NSArray *names = [_patterns valueForKey:@"patternName"];
     NSArray *urls = [_patterns valueForKey:@"patternUrl"];

     if (names!= nil) {
        cell.textLabel.text = [names objectAtIndex:indexPath.row];           
     }
     else cell.textLabel.text = @"Blank";
     cell.detailTextLabel.text = [urls objectAtIndex:indexPath.row];
     cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;
     return cell;
 }

I can add a defined record (copies the url of the page the user is viewing inserting the URL into both the url field and the name attributes). Editing or creating a new record pops a ModalViewController that presents (for existing records) and captures data in textfields (for new records). Selecting the save crashes, changes only the record of the last-added defined record even if it has been edited and adds that as a new record, keeping the old one. I think somethings wrong with my keeping track of the number of cells.

Any suggestions would be most 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-24T17:21:09+00:00Added an answer on May 24, 2026 at 5:21 pm

    What you get from executeFetchRequest is array of objects not attributes. You need to loop through array of objects and get attributes from each of them

    This

    _patterns = [context executeFetchRequest:fetchRequest error:nil];
         [fetchRequest release];
         NSArray *names = [_patterns valueForKey:@"patternName"];
         NSArray *urls = [_patterns valueForKey:@"patternUrl"];
    
         if (names!= nil) {
            cell.textLabel.text = [names objectAtIndex:indexPath.row];           
         }
    

    Should become

    _patterns = [context executeFetchRequest:fetchRequest error:nil];
         [fetchRequest release];
    
    
         if (names!= nil) {
            cell.textLabel.text = [[_patterns objectAtIndex:indexPath.row] valueForKey:@"patternName"];           
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:
I keep getting the error Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[MainViewController
I am getting this error: *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason:
I am getting the error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:
I am getting an error of: * Terminating app due to uncaught exception 'NSInvalidArgumentException',
I am getting below error that causing crash. Terminating app due to uncaught exception
My app is crashing with the error Terminating app due to uncaught exception 'NSInvalidArgumentException',
I am getting the following error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyExprojectception',
I'm getting this error message when I Build&Go: *** Terminating app due to uncaught
Getting error at line: [self.routineTableView insertSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationBottom]; * Terminating app due to uncaught

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.