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

  • SEARCH
  • Home
  • 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 6582005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:13:35+00:00 2026-05-25T16:13:35+00:00

I am getting this weird exception and I have no clue how to figure

  • 0

I am getting this weird exception and I have no clue how to figure out what’s going wrong here

"Serious application error.  **Exception was caught during Core Data change processing.**  This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification.  **Can't look for value (552284302) in string (1070635162, 630076961, 690758344, 714304224, 693603903, 650263092, 552284302); value is not a string  with userInfo (null)**"

My code is as follows:

- (NSFetchedResultsController *)fetchedResultsController {

if (_fetchedResultsController != nil) {
    return _fetchedResultsController;
}

NSManagedObjectContext *context =   [ (MyAppDelegate*)[[UIApplication sharedApplication] delegate]managedObjectContext];

NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init];
NSEntityDescription *entity = [NSEntityDescription 
                               entityForName:@"MyEntityName" inManagedObjectContext:context];
[fetchRequest setEntity:entity];

NSSortDescriptor *sort = [[NSSortDescriptor alloc] 
                          initWithKey:@"distance" ascending:YES];
[fetchRequest setSortDescriptors:[NSArray arrayWithObject:sort]];

[fetchRequest setFetchBatchSize:20];

User *user = [[DatabaseHelper sharedInstance] getUserDetails];
NSString *predicteString = [NSString stringWithFormat:@"isPrivate == %@  AND recepientList contains %@", [NSNumber numberWithBool:YES], user.userId];

if(dootType == UnReadDootType){
    predicteString = [predicteString stringByAppendingString:@" AND state = 'NEW' "];
}


NSPredicate *predicate;
if(senderId != nil && [senderId intValue] > 0){
    predicteString = [predicteString stringByAppendingString:@" AND senderId == %@"];

    predicate = [NSPredicate
                 predicateWithFormat:predicteString, senderId];

}else{
    predicate = [NSPredicate
                 predicateWithFormat:predicteString];
}

[fetchRequest setPredicate:predicate];


NSFetchedResultsController *theFetchedResultsController = 
[[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest 
                                    managedObjectContext:context sectionNameKeyPath:nil 
                                               cacheName:@"MyEntityName"];

self.fetchedResultsController = theFetchedResultsController;
_fetchedResultsController.delegate = self;

[sort release];
[fetchRequest release];
[theFetchedResultsController release];

return _fetchedResultsController;    

}

The NSFetchRequest logs as:

<NSFetchRequest: 0x362350> (entity: MyEntityName; predicate: (isPrivate == 1 AND recepientList CONTAINS 552284302); sortDescriptors: ((
    "(distance, ascending, compare:)"
)); batch size: 20; type: NSManagedObjectResultType; )

So as you can see I am using a predicate like recepientList CONTAINS 552284302
and for one of my record the recepientList has 1070635162, 630076961, 690758344, 714304224, 693603903, 650263092, 552284302 I am storing comma separated userId in the recepientList, so I am not sure why this exception.

  • 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-25T16:13:35+00:00Added an answer on May 25, 2026 at 4:13 pm

    The user.userID is being parsed as a numerical value instead of a string. The CONTAINS operator does not understand numerical values.

    The predicate that logs as:

    (isPrivate == 1 AND recepientList CONTAINS 552284302)
    

    … should log as:

    (isPrivate == 1 AND recepientList CONTAINS "552284302")
    

    The former predicate looks for a numerical value while later looks for a string. (Note that the numerical one in isPrivate == 1 is not quoted.)

    If user.userID is a NSNumber then getting it’s string value should correct the problem. Try:

    NSString *predicteString = [NSString stringWithFormat:@"isPrivate == %@  AND recepientList contains %@", [NSNumber numberWithBool:YES], [user.userId stringValue]];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
i'm getting a weird null pointer exception in the last line of this code:
I am getting this weird RunTime error. The classes compile easy on eclipse but
I am getting this weird error while running cucumber test: ERROR Mongo::OperationFailure: Database command
I am getting a weird exception when I exit the program. This has started
I'm getting a very weird error. I have 2 activities. On both I'm getting
Out of the blue I am getting a weird error for any rake command
I'm getting a weird issue with nHibernate... I'm getting this exception: Unable to resolve
We're getting this weird exception when trying to create a BitmapDecoder off an ASP.Net
I have a file that I am getting a very weird error on. The

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.