-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite error in Apptentive DB #71
Comments
Hi @eaceto. We're sorry this is happening! We have one other report of this, and are trying to narrow down how it happens. Some questions that will help us figure this out:
If you can reproduce this yourself, I'd love to get a copy of the files of the app from the device you can reproduce the problem on. At this point, it seems like the problem is resolved if users delete and reinstall the app. We're working hard to figure out a fix and will get it out as soon as we can! |
We think this was caused by SQLite on iOS 7 now using write ahead logging (WAL) by default, which is similar to the issue here: http://pablin.org/2013/05/24/problems-with-core-data-migration-manager-and-journal-mode-wal/ We have a candidate fix available here: https://github.com/apptentive/apptentive-ios/tree/MigrationFix This fix does two things, it switches our Core Data database from WAL to the previous default (DELETE mode) on migration. So, any databases that get migrated from here on out won't use WAL. (I haven't been able to reliably move a database from WAL to DELETE without a migration.) It also performs a sanity check on the database at startup and tries to detect the corruption we're seeing. If so, it deletes our database and starts over. If this looks good, you may want to use it for your fix release. If you see any issues with it, please let me know. We're going to continue pounding on it on our end. |
By the way, @eaceto, is this happening in a live app? If so, email me: [email protected] and we can use some over-the-air measures to reduce the likelyhood of this crash in your current live app. |
We've just released v1.2.3, which we believe fixes these problems: https://github.com/apptentive/apptentive-ios/releases/tag/v1.2.3 If it doesn't fix them for you, please let us know! |
In my application I got the following exception
Fatal error. The database at /var/mobile/Applications/95709F07-B065-47F4-B338-CE48599EAA37/Library/Application Support/com.apptentive.feedback/ATDataModel.sqlite is corrupted. SQLite error code:11, 'database disk image is malformed'
APP-[ATAbstractMessage updateWithJSON:]
The stack trace is:
22 APP 0x001354fb -[ATAbstractMessage updateWithJSON:]
23 APP 0x001372dd -[ATTextMessage updateWithJSON:]
24 APP 0x00134f01 -[ATAutomatedMessage updateWithJSON:]
25 APP 0x00134ddf +[ATAutomatedMessage newInstanceWithJSON:]
26 APP 0x0013264f -[ATGetMessagesTask(Private) processResult:]
27 APP 0x001320c9 -[ATGetMessagesTask at_APIRequestDidFinish:result:]
28 APP 0x0010b6df -[ATAPIRequest connectionFinishedSuccessfully:]
29 Foundation 0x2f1b100d
30 Foundation 0x2f1b49c5
31 APP 0x000fc43f -[ATURLConnection connectionDidFinishLoading:]
How can I fix this in the following release of the app?
The text was updated successfully, but these errors were encountered: