I have with this bad night. I ran and tested my code on iOS 5.0, as I had to update quickly. I had problems installing, so 4.3 Simulator was not available to me until recently. I (I thought) developed all of my lightweight Core Data transfer problems. Tonight I went to run the application in simulator 4.3 and on the iPad with 4.3. What I found was terrible.
This error every time:
2011-10-27 07: 01: 44.045 AppName [924: 10d03] * Application terminated due to uncaught exception "NSInvalidArgumentException", reason: '* - [NSCFDictionary initWithObjects: forKeys: count:]: attempt to insert nil value into objects [ 0] (key: sourceRelationship) '* Call stack on first throw: (0 CoreFoundation 0x018655a9 exceptionPreprocess + 185 1 libobjc.A.dylib
0x01a66313 objc_exception_throw + 44 2 CoreFoundation
0x017aedcb - [__ NSPlaceholderDictionary initWithObjects: forKeys: count:] + 587 3 CoreFoundation 0x017c76da + [NSDictionaryWithObject dictionary: forKey:] + 74 4 CoreData 0x0135bdea - [_ NSSQLTableMigrationDescription appendStateTermmentTementmentPermmentTentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentmentationpt
CoreData 0x01357254 - [_ NSSQLiteStoreMigrator createEntityMigrationStatements] + 356 6 CoreData 0x01356246 - [_ NSSQLiteStoreMigrator performMigration:] + 86 7 CoreData 0x0135c78f - [NSSQLiteInataDerminationLaTimeRetOmementationTourModeIrmentOrmentOrmentModelOURMementOrmentLaMeTourLementOrmentMementOrimentLementOrmentMementOrmementOrmentLaMeTorLementmentOrmentMeratmentLaMeURDementationRegulation - [NSStoreMigrationPolicy (InternalMethods) migrateStoreAtURL: toURL: storeType: options: withManager: error:] + 154 9 CoreData 0x01342052 - [NSStoreMigrationPolicy migrateStoreAtURL: withManager: metadata: options: error:] +146MtribleModiMalp :] + 1315 11 CoreData 0x01256aec - [NSPsistentStoreCoordinator addPersistentStoreWithType: configuration: URL: options: error:] + 2412 12 AppName 0x0007aae7 - [AppDelegate persistentStoreCoordinator] + 791 13 AppName 0x0007a6ate_OnCode_Online_Docs_Operation - [AppDelegate getSettings] + 125 15 AppName
0x00078160 - [BagAppDelegate refreshSettings] + 48 16 AppName 0x00077cd7 - [AppDelegate application: didFinishLaunchingWithOptions:] + 391 17 UIKit 0x00409c89 - [UIApplication _callInitializationDelegate: IOlit_unload18 statusBarStyle: statusBarHidden:] + 439 19 UIKit 0x00416617 - [UIApplication handleEvent: withNewEvent:] + 1533 20 UIKit 0x0040eabf - [UIApplication sendEvent:] + 71 21 UIKit
0x00413f2e _UIApplicationHandleEvent + 7576 22 GraphicsServices
0x01f03992 PurpleEventCallback + 1550 23 CoreFoundation
0x01846944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52 24 CoreFoundation 0x017a6cf7 __CFRunLoopDoSource1 + 215 25 CoreFoundation 0x017a3f83 __CFRunLo79Run
0x017a3840 CFRunLoopRunSpecific + 208 27 CoreFoundation
0x017a3761 CFRunLoopRunInMode + 97 28 UIKit
0x0040b7d2 - [UIApplication _run] + 623 29 UIKit
0x00417c93 UIApplicationMain + 1160 30 AppName
0x0000232d main + 125 31 AppName
0x000022a5 start + 53
and it shows an error like here when I set persistentStoreCoordinator:
NSError *error; if (![persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error]) {
I am sure the last code is fine - I have never had a problem with this.
The error is clearly related to easy migration, and for the life of me I cannot understand that. I sat here with tears for several hours (but I'm a girl, so good .. jk) and nothing works, and I don't have any good information from Google searches.
I am not updating an existing application, just trying to install a new one when that happens.
I really need help in despair, usually I have an idea of ββwhat to do, but I'm so lost in space right now. Thanks in advance for any ideas.
EDIT: Thought it might have something to do with repairing permissions to disk. Does not work. There seems to be something wrong with the matching model. I assume that it will be automatically created (s) because I did not create it.
source share