• 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
re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO


  • Subject: re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
  • From: Ben Trumbull <email@hidden>
  • Date: Mon, 1 Jun 2009 15:01:22 -0700

Now that 10.5.7 (allegedly) fixes the incompatibilities between the SQL
store and GC apps, I have been trying to switch from XML to SQL. Most
problems I've fixed, but I'm getting an exception:

Yes, 10.5.7 fixes all the known issues with (GC, NSDocument, NSSQLiteStore). The incompatibilities were in document based apps. Non-document GC apps worked with the NSSQLiteStore prior to 10.5.7


"statement is still active"

See backtrace below. I've search the archives of course, and see that
this is usually a threading problem. My app is multithreaded, but I do
all my UI, bindings, and Core Data stuff on the main thread (barring
mistakes).


Experimentation has revealed that if I change this:

	[request setReturnsObjectsAsFaults:NO];

from NO to YES the problem goes away.

What might I be doing wrong here? Or is this a Core Data bug?

This is a known issue that is not related to GC. On all versions of 10.5, Core Data is less than completely thrilled by fetching recursively in -awakeFromFetch. This has subsequently been fixed.


- Ben

#0 0x9539ae17 in objc_exception_throw ()
#1 0x92b1f178 in -[NSSQLConnection prepareSQLStatement:] ()
#2 0x92b1ea33 in -[NSSQLiteConnection prepareSQLStatement:] ()
#3 0x92b4fdab in -[NSSQLChannel selectRowsWithCachedStatement:] ()
#4 0x92b1b17b in newFetchedRowsForFetchPlan_MT ()
#5 0x92b4f410 in -[NSSQLCore newFetchedPKsForSourceID:andRelationship:] ()
#6 0x92b4eeff in -[NSSQLCore retaine
dRelationshipDataWithSourceID:forRelationship:withContext:] ()
#7 0x92b4ec47 in -[NSFaultHandler re
tainedFulfillAggregateFaultForObject:andRelationship:withContext:] ()
#8 0x92b25597 in -[_NSFaultingMutableSet willRead] ()
#9 0x92b28459 in -[_NSFaultingMutableSet
countByEnumeratingWithState:objects:count:] ()
#11 0x003cc449 in -[MyManagedObjectSuperClass awakeFromFetch]
#12 0x003cdf70 in -[MyManagedObject awakeFromFetch]
#13 0x92b0b987 in _PFFaultHandlerFulfillFault ()
#14 0x92b38162 in -[NSSQLCore _prepareResultsFromResultSet:usingFetchPlan:] ()
#15 0x92b242ab in -[NSSQLCore _newRow
sForFetchPlan:selectedBy:withArgument:] ()
#16 0x92b141b0 in -[NSSQLCore newRowsForFetchPlan:] ()
#17 0x92b13d10 in -[NSSQLCore objectsForFetchRequest:inContext:] ()
#18 0x92b13a17 in -[NSSQLCore executeRequest:withContext:] ()
#19 0x92b12aaa in -[NSPersistentStoreCoordinator(_NSInternalMethods)
executeRequest:withContext:] ()
#20 0x92b1007b in -[NSManagedObjectContext executeFetchRequest:error:] ()

_______________________________________________

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: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: How determine if file is in Trash, given Path or Alias
  • Next by Date: Re: NSXMLParser - howto resolve entities defined in DTD
  • Previous by thread: Re: gcc parsing error?
  • Next by thread: Re: SQL store, GC apps, "statement is still active" exception, setReturnsObjectsAsFaults:NO
  • Index(es):
    • Date
    • Thread