• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Endless Hang on Saving a Core Data Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Endless Hang on Saving a Core Data Document


  • Subject: Endless Hang on Saving a Core Data Document
  • From: Andrew Merenbach <email@hidden>
  • Date: Wed, 27 Feb 2008 20:15:01 -0800

Hi, all,

I made a discovery today: a program of mine, which has multiple document types, freezes upon saving for a second time after changes have been made (following a first save). I tried interrupting using GDB, and I also tried using Spin Control. Below is (what I think is relevant) from what Spin Control displayed.

* Details of a common example: My program maintains a list of entries in a table view using Core Data entities in an NSArrayController subclass. If after my first save I add an entry and then delete it, my program will save again without freezing. If I add one and do not delete it, it will cause a freeze-up.

A search for the words "core," "data," and "hang" yielded an interesting discussion on saving to a persistent store, but failed to find anything that I thought was relevant to my situation.

I am using Leopard and Xcode 3. I would be happy to post relevant code, if only I knew what code (out of more than eighty files) to post. This problem may very well be with my code, but I have no clue where to look. Basically, I suppose that I'm asking: what sort of programming error would yield a hang involving a call to - [NSSQLiteConnection execute] (as you might see below)? My actions before the hang involve new items being added through - [NSArrayController add:].

Any ideas would be helpful!

Cheers,
	Andrew

Call graph:
742 Thread_4d03
742 start
742 main
742 NSApplicationMain
742 -[NSApplication run]
742 -[NSApplication sendEvent:]
742 -[NSApplication _handleKeyEquivalent:]
742 -[NSMenu performKeyEquivalent:]
742 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:]
742 -[NSMenu performActionForItemAtIndex:]
742 -[NSApplication sendAction:to:from:]
742 -[NSDocument saveDocumentWithDelegate:didSaveSelector:contextInfo:]
742 -[NSDocument saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo:]
742 -[NSDocument _saveToURL:ofType:forSaveOperation:delegate:didSaveSelector:contextInfo :]
742 -[NSDocument saveToURL:ofType:forSaveOperation:error:]
742 -[NSPersistentDocument writeSafelyToURL:ofType:forSaveOperation:error:]
742 -[DLBasicDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
742 -[NSPersistentDocument writeToURL:ofType:forSaveOperation:originalContentsURL:error:]
742 -[NSManagedObjectContext save:]
742 - [NSPersistentStoreCoordinator(_NSInternalMethods) executeRequest:withContext:]
742 -[NSSQLCore executeRequest:withContext:]
742 -[NSSQLCore saveChanges:]
742 -[NSSQLCore performChanges]
742 -[NSSQLCore _performChangesWithAdapterOps:]
742 - [NSSQLConnection performAdapterOperations:]
742 - [NSSQLiteConnection insertRow:]
742 - [NSSQLiteConnection execute]
742 _execute
482 usleep $UNIX2003
482 nanosleep$UNIX2003
482 __semwait_signal
482 __semwait_signal
260 sqlite3_step


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Endless Hang on Saving a Core Data Document (addendum)
      • From: Andrew Merenbach <email@hidden>
  • Prev by Date: Re: Table views with different NSArrayControllers sharing the same data object...
  • Next by Date: Re: Endless Hang on Saving a Core Data Document (addendum)
  • Previous by thread: Re: Table views with different NSArrayControllers sharing the same data object...
  • Next by thread: Re: Endless Hang on Saving a Core Data Document (addendum)
  • Index(es):
    • Date
    • Thread