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

The Archive Base Latest Questions

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

I run my app and then fetched my data. Data is ok. When I

  • 0

I run my app and then fetched my data. Data is ok. When I run second time I got fault for my old values. What is wrong?

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
 NSEntityDescription *entity = [NSEntityDescription entityForName:@"Test" inManagedObjectContext:[self managedObjectContext]]; 
    for (int i =0; i<2; i++) 
    {
        Test *test = [[[Test alloc] initWithEntity:entity insertIntoManagedObjectContext:[self managedObjectContext]] autorelease];
        test.text = @"Text";
        test.index = [NSNumber numberWithInt:i];
    }
    [self saveContext];
}


-(void) showValues
{    
 NSEntityDescription *entity = [NSEntityDescription entityForName:@"Test" inManagedObjectContext:[self managedObjectContext]];
 NSFetchRequest *request = [[[NSFetchRequest alloc] init] autorelease];
 [request setEntity:entity];    
 NSError *error;    
 NSArray *array = [[self managedObjectContext] executeFetchRequest:request error:&error];
 NSLog(@"Array: %@ ", array);    
}

first run

2012-01-22 21:48:52.092 Mew[411:707] Array: (
"<Test: 0x183f60> (entity: Test; id: 0x1856b0 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p1> ; data: {\n    index = 0;\n    text = Text;\n})",
"<Test: 0x184940> (entity: Test; id: 0x1857e0 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p2> ; data: {\n    index = 1;\n    text = Text;\n})"
) 

second run // first and second values are fault

2012-01-22 21:50:29.892 Mew[429:707] Array: (
"<Test: 0x16c950> (entity: Test; id: 0x16c720 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p1> ; data: <fault>)",
"<Test: 0x16d130> (entity: Test; id: 0x16c730 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p2> ; data: <fault>)",
"<Test: 0x1684c0> (entity: Test; id: 0x16bfd0 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p3> ; data: {\n    index = 0;\n    text = Text;\n})",
"<Test: 0x16ab90> (entity: Test; id: 0x16c100 <x-coredata://90165BCF-D2DE-4661-9B12-33EF86F0C09F/Test/p4> ; data: {\n    index = 1;\n    text = Text;\n})"
) 
  • 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-28T13:22:21+00:00Added an answer on May 28, 2026 at 1:22 pm

    <fault> does not mean that your data is corrupted. It means that it is dynamically linked with the fetched results and the actual object will be loaded when any attempt is made to access any value/property from the object. remember – you have used @dynamic in .m file?
    That’s why it shows <fault> when you NSLog with array and fault disappears when you access any property of the object NSLog(@"Test: %@ ", test.text);

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

Sidebar

Related Questions

The app will run fine, then crash - literally every other time. It seems
Just wondering if anybody has run Scala app or web-app on Java Real-Time system?
I did a grails clean and afterwards when I run via grails run-app the
When I run my app with Leaks and view the Extended Details for any
Can a LINQ enabled app run on a machine that only has the .NET
I'd like to run an app in the KIOSK mode, so that it auto-starts
Is there a difference in double size when I run my app on 32
This happens after I hit Build and Go to run my app on my
i create some project but when start App. How to Run this App one
If I drop a UIDatePicker onto a UIView in IB and run the app,

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.