problem debugging Core Data
problem debugging Core Data
- Subject: problem debugging Core Data
- From: "Xavi Caballé" <email@hidden>
- Date: Wed, 28 Jun 2006 17:54:29 +0200
Hello,
I am trying to debug an app that uses Core Data. I've set the Core
Data debug level to 3 (using the -com.apple.CoreData.SQLDebug argument
when launching the app). The problem is that the app raises an
exception when starting, and looking at the stack, I think it's a
problem with the the code that logs Core Data's debug info. Here are
the relevant entries in the stack:
#0 0x9080b0a1 in _CFStringAppendFormatAndArgumentsAux
#1 0x90809c8c in _CFStringCreateWithFormatAndArgumentsAux
#2 0x92741888 in NSLogv
#3 0x9277f0b4 in NSLog
#4 0x93e1a401 in -[NSSQLCore _newRowsForSelector:withArgument:andLimit:]
#5 0x93de004b in -[NSSQLCore newRowsForFetchRequest:]
#6 0x93ddfcfa in -[NSSQLCore objectsForFetchRequest:inContext:]
#7 0x93dd244e in -[NSPersistentStoreCoordinator(_NSInternalMethods)
executeRequest:withContext:]
#8 0x93dd1729 in -[NSManagedObjectContext executeFetchRequest:error:]
#9 0x000322a6 in -[LocalLibraryManager fetchAllTracksUsingMoc:] at
LocalLibraryManager.m:597
...
The code that sends the message executeFetchRequest:error: is this:
NSError *error = nil;
NSEntityDescription *entityDescription = [NSEntityDescription
entityForName:@"Track" inManagedObjectContext:moc];
NSFetchRequest *request = [[NSFetchRequest alloc] init];
[request setEntity:entityDescription];
NSArray *result = [moc executeFetchRequest:request error:&error];
...
I guess that Apple's code is confused with some string which contains
a percent sign that's not meant to be parsed as a formatting character
but as a literal. But even if that's the problem, I don't know how to
avoid it.
All works OK if I set the debug level to 2, but I need more info to
debug the problem I was originally working on, so I would like to be
able to use level 3.
I would really appreciate any idea about how to solve this.
Thanks in advance.
xavi
_______________________________________________
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