• 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
CoreData - sqlite - statement is still active
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData - sqlite - statement is still active


  • Subject: CoreData - sqlite - statement is still active
  • From: Terrence Talbot <email@hidden>
  • Date: Thu, 6 Oct 2005 10:17:11 -0700


The problems I'm having with Core Data, of late, all seem to be crashers inside sqlite. Not sure what to do about it/them. The most annoying occurs, occasionally!, after fetching new instances of managed objects, same entity, one after another, and then calling valueForKey: on a related object. I think the problem is really in the original fetching. It seems like the standard call to "fetchedObjects = [self executeFetchRequest:fetchRequest error:anError];" with fetchRequest along the lines of <NSFetchRequest: 0xc5c4d80> (entity: Media; predicate: (name LIKE "Aqua"); sortDescriptors: (null); limit: 0) is not returning before another fetch begins. Can this be right?? Core Data, or really sqlite, seems pretty unhappy about this.


As I say, 90%+ of these calls work perfectly fine, but the one that doesn't stops me cold. If anyone has any ideas/suggestions to figure out what's going on and/or a workaround to avoid it, I would be *so* happy.

Thanks,


Terrence




Basically the typical backtrace looks like this:

sqlite3_data_count
sqlite3_data_count
sqlite3_column_int64
[NSSQLiteConnection _newObjectIDForCurrentRowWithEntity:]
[NSSQLiteConnection newFetchedRow]
[NSSQLChannel fetchRow]
[NSSQLCore _newRowsForFetchRequest:]
[NSSQLCore fetchRowForObjectID:]
[NSSQLCore retainedDataForObjectID:withContext:]
[NSFaultHandler fulfillFault:withContext:]
[NSManagedObject(_NSInternalMethods) _genericValueForKey:withIndex:flags:]
_NSGetUsingKeyValueGetter


With this on the console:

[snip] fetching media with name Branching_Out
[snip] Uncaught exception - statement is still active
[snip] *** Attempt to remove unrecognized exception handler 0xbfffd094
[snip] fetching media with name Trippy
[snip] Uncaught exception - _obtainOpenChannel -- NSSQLCore 0x7956730: no database channel is available
[snip] *** Attempt to remove unrecognized exception handler 0xbfffd094
[snip] fetching media with name Vector
[snip] Uncaught exception - _obtainOpenChannel -- NSSQLCore 0x7956730: no database channel is available
[snip] *** Attempt to remove unrecognized exception handler 0xbfffd094
[snip] fetching media with name Open_All
[snip] Uncaught exception - _obtainOpenChannel -- NSSQLCore 0x7956730: no database channel is available
[snip] *** Attempt to remove unrecognized exception handler 0xbfffd094
[Switching to process 16968 thread 0x740b]
Program received signal: "EXC_BAD_ACCESS".
[Switching to process 16968 thread 0x740b]
warning: Previous frame identical to this frame (corrupt stack?)


The "fetching media" statements are, obviously, my log statements. By this point in the app, it's already fetched about 50 media objects by name just fine.


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: CoreData - sqlite - statement is still active
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Flipping an NSImage
  • Next by Date: Re: CoreData - sqlite - statement is still active
  • Previous by thread: Re: Flipping an NSImage (SOLVED)
  • Next by thread: Re: CoreData - sqlite - statement is still active
  • Index(es):
    • Date
    • Thread