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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:21:05+00:00 2026-05-16T21:21:05+00:00

I have small COCOA Mac OS application to play with core data. I have

  • 0

I have small COCOA Mac OS application to play with core data.
I have overridden default save function to do extra job after saving document (automatically save a zip copy also).

Every time I save – program crashes with EXC_BAD_ACCESS in line where I call [super writeToURL …]
The good part is – document is being saved properly. Here is the code:

    - (BOOL)writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error{

        NSLog(@"Overriding SAVE operation");
       //  Crash everytime with objc_msSend or EXC_BAD_ACCESS (but saves properly):
        BOOL res = [super writeToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName forSaveOperation:(NSSaveOperationType)saveOperation originalContentsURL:(NSURL *)absoluteOriginalContentsURL error:(NSError **)error];

        if(res){ // zip and save zipped copy...}..
    }

Every time I get similar but not identical stack trace, saying about not recognizing selector or problem with removing something from persistentStoreCoordinator.

My coordinaror is configured simple way:

NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:

                             [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
                             [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];

Anyone has a clue wht could be happenin?
I could not track it for a long time now…

Debugger stack trace:

 #0 0x9141f4e6 in objc_exception_throw
#1  0x951288e8 in +[NSException raise:format:arguments:]
#2  0x9512885a in +[NSException raise:format:]
#3  0x956837dc in -[_NSManagedProxy _entity]
#4  0x9568392a in -[_NSManagedProxy fetchRequestWithSortDescriptors:limit:]
#5  0x95961f4a in -[_NSManagedProxy _storesDidChange:]
#6  0x95f801c3 in _nsnote_callback
#7  0x950b03c3 in __CFXNotificationPost
#8  0x950afdca in _CFXNotificationPostNotification
#9  0x95f75090 in -[NSNotificationCenter postNotificationName:object:userInfo:]
#10 0x906da1dc in -[NSPersistentStoreCoordinator(_NSInternalMethods) _postStoresChangedNotificationsForStores:changeKey:options:]
#11 0x906cbd52 in -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]
#12 0x9597f2e7 in -[NSPersistentDocument configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:]
#13 0x00002a35 in -[MyDocument configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error:] at MyDocument.m:79
#14 0x95c3536f in -[NSPersistentDocument(NSDeprecatedInternal) _configurePersistentStoreCoordinatorForURL:ofType:error:]
#15 0x9597f585 in -[NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
#16 0x00002ab9 in -[MyDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:] at MyDocument.m:90
#18 0x95822a4a in -[NSDocument writeSafelyToURL:ofType:forSaveOperation:error:]

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-16T21:21:06+00:00Added an answer on May 16, 2026 at 9:21 pm

    Thank you guys for help. After recreating tables which were behaving in strange way in xcdatamoel visual view everything works fine now. 2 tables on graph view where joined together while still being visible on the entities list. I could not find a way to separate them without deleting from the model itself.

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

Sidebar

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.