I'm starting to see telemetry come back for our latest release build with Xcode 7. I'm seeing what seems to be data corruption for our CoreData databases, but only on iOS 9. I'm seeing two forms, both when the application tries to reopen the database on launch:
Could not create history store with error Error Domain=NSCocoaErrorDomain Code=259 "The file couldn’t be opened because it isn’t in the correct format." UserInfo={NSSQLiteErrorDomain=26, NSUnderlyingException=File at path does not appear to be a SQLite database: /var/mobile/Containers/Data/Application/95677339-A20B-4EBF-B1B4-0AB6AC5E1080/Library/Application Support/History.db}
That one I have no ideas on. It's like our database just became magically corrupted.
Could not create thumbnail store with error Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={destinationURL=file:///var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/.Thumbnails.db.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3, reason=Cannot migrate store in-place: I/O error for database at /var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/.Thumbnails.db.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3. SQLite error code:1, 'no such column: ZACTIONTOKEN', NSUnderlyingError=0x15621090 {Error Domain=NSCocoaErrorDomain Code=134110 "An error occurred during persistent store migration." UserInfo={NSSQLiteErrorDomain=1, NSFilePath=/var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/.Thumbnails.db.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3, reason=I/O error for database at /var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/.Thumbnails.db.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3. SQLite error code:1, 'no such column: ZACTIONTOKEN', NSUnderlyingException=I/O error for database at /var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/.Thumbnails.db.migrationdestination_41b5a6b5c6e848c462a8480cd24caef3. SQLite error code:1, 'no such column: ZACTIONTOKEN'}}, sourceURL=file:///var/mobile/Containers/Data/Application/36E5990A-CF49-44C4-8C1B-9338C7A2A3FE/Library/Caches/Thumbnails.db}
This one is odd because the store throwing the error has a custom configuration that shouldn't require the column SQLite is complaining about, and the database shouldn't need migration.
I haven't been able to repro in house, but this only happening for our iOS 9 customers seems like it might be one clue. Were there any changes to CoreData in iOS 9 that could cause us to trip into one of these issues?