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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:40:55+00:00 2026-05-16T14:40:55+00:00

I have a to-one relationship between a Document and Settings model: On creation of

  • 0

I have a to-one relationship between a Document and Settings model:

alt text

On creation of a Document, a corresponding Settings object is created. The models are persisted to core data.

When relaunching after creating a few documents (and the associate settings), the application reloads a list of documents to select using:

// Load delegate from shared application and context from delegate.
SampleAppDelegate *delegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *context = delegate.managedObjectContext;

// Create new request.
NSFetchRequest *request = [[NSFetchRequest alloc] init];

// Create entity description using delegate object context.
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Document" inManagedObjectContext:context];

// Set entity for request.
[request setEntity:entity];

// Load array of documents.
NSError *error;
NSArray *documents = [context executeFetchRequest:request error:&error];

// Rlease descriptor.
[descriptor release];

// Release request.
[request release];

// Done.
return documents;

The list appears fine (the documents are loading). However, when attempting to access the settings for any of the documents the program exits giving:

Program received signal: “SIGABRT”.

The modifications to the settings are triggered when a user selects a button. Strangely enough, the program does not crash if the following snippet is added just before returning the documents on load (i.e. if the relationships are accessed while loading):

for (Document *document in documents)
{
    NSLog(@"document.name: %@", document.name);
    NSLog(@"document.settings.stroke: %@", document.settings.stroke);
    NSLog(@"document.settings.stroke: %@", document.settings.stroke);
}

The property for the relationship is “(nonatomic, retain)” and uses “@dynamic”. Any ideas? Thanks!

  • 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-16T14:40:56+00:00Added an answer on May 16, 2026 at 2:40 pm

    After spending way too much time on this bug, I finally figured it out. During the initial load of the values, I setting a KVO. This code was causing crashes the crashes (although they were not appearing until the next run loop):

    [self.document.settings addObserver:self forKeyPath:@"fill" options:0 context:NULL];
    [self.document.settings addObserver:self forKeyPath:@"stroke" options:0 context:NULL];
    

    Not sure why it was an issue, but I was lucky enough to be able to simply remove it for now.

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

Sidebar

Related Questions

I have a one-to-one unidirectional relationship between a Booking object and an Address object
Suppose i have a one to many relationship between two model entities Entity One
I have one-to-many relationship between parent and child Java objects. The parent object uses
I have a one way @OneToMany relationship between a Team and Player class. I
I have a one-to-many relationship between two classes for this situation. I have a
I have a one-to-many relationship between Foo and Bar and I cannot perform an
I have a Hash Map (many-to-one relationship between texts and boolean values): name flag
I'm trying to configure a one to one relationship between entities which both have
I have a simple has_one/belongs_to relationship between two models. This is a new association
android noob... I have two tables, with a one to many relationship between country_tbl

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.