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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:26:48+00:00 2026-05-27T05:26:48+00:00

My app uses an sqlite database managed with core-data. These are the errors I

  • 0

My app uses an sqlite database managed with core-data. These are the errors I found in the debug files. On the simulator it works just fine, no problems at all. Made the app in Xcode 4.2 iOS 5 and tried it on an iPhone 4 4.2.1.

 Incident Identifier: 65E195D6-C583-4CA2-8017-1AEC56FAFBD4
    CrashReporter Key:   4ebf8de224465a40c94ea40cffb742f345888ef0
    Hardware Model:      iPhone3,1
    Process:         Jobs [158]
    Path:            /Applications/Jobs.app/Jobs
    Identifier:      Jobs
    Version:         ??? (???)
    Code Type:       ARM (Native)
    Parent Process:  punchd [1]    
    Date/Time:       2011-12-01 13:53:22.288 +0000
    OS Version:      iPhone OS 4.2.1 (8C148)
    Report Version:  104    
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x00000000, 0x00000000
    Crashed Thread:  0    
    Thread 0 Crashed:   
    4   Jobs                            0x00002c74 0x1000 + 7284
    5   Jobs                            0x00002a0a 0x1000 + 6666
    6   Jobs                            0x00003012 0x1000 + 8210   
    36  Jobs                            0x0000283c 0x1000 + 6204
    37  Jobs                            0x000027f4 0x1000 + 6132

Error 4 leads to this line of code:

__persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
    if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error])
    {        NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
        abort(); //this one to be exact
    }    

Error 5 leads to this line of code:

- (NSManagedObjectContext *)managedObjectContext
{    if (__managedObjectContext != nil)
    {        return __managedObjectContext;    }    
    NSPersistentStoreCoordinator *coordinator = [self persistentStoreCoordinator]; //this line with error;
    if (coordinator != nil)
    {        __managedObjectContext = [[NSManagedObjectContext alloc] init];
        [__managedObjectContext setPersistentStoreCoordinator:coordinator];    }
    return __managedObjectContext;}

These were in the app delegate.
Now the 6th error is from the main view, in the ViewDidLoad:

 if (managedObjectContext == nil) 
    { 
        managedObjectContext = [(MyAppDelegate *)[[UIApplication sharedApplication] delegate] managedObjectContext]; //this line;
        NSLog(@" %@",  managedObjectContext);} 

In response to request in comments:

- (NSPersistentStoreCoordinator *)persistentStoreCoordinator { 
    if (__persistentStoreCoordinator != nil) {
        return __persistentStoreCoordinator;
    }

    NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:@"MyDatabase.sqlite"];
    NSError *error = nil;
    NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
   ...

Also:

- (NSURL *)applicationDocumentsDirectory {
    return [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject];
}
  • 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-27T05:26:48+00:00Added an answer on May 27, 2026 at 5:26 am

    Your app is not crashing, it is aborting as you instruct it to in abort because this line of code is returning YES—as in, it didn’t successfully addPersistentStoreWithType, since you are testing if(!:

     if (![__persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error])
    

    A good starting point to being able to solve this would be to show us the code that allocates/defines storeURL, options, and error. Most likely, one of these does not exist or has not been initialized correctly.

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

Sidebar

Related Questions

My app uses a local SQLite database to read data. Just a couple of
I'm making an app that uses a SQLite database to store data. Sometimes my
My app uses a simple SQLite database. Everything works fine I can now present
My iphone app uses a SQLite database to store data. I have a table
I'm developing an iphone app that uses Core Data with a SQLite data store
I'm developing an iPhone app that uses the built-in SQLite database. I'm trying to
I have c# application which writes files to an sqlite database. It uses entity
I have an app that uses a SQLite database. When the app updates at
So my Android app uses a SQLite database. I need to replicate two or
I'm working on an iPhone app, which uses the SQLite database, and I'm trying

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.