Project: titanium
Issue TIMOB-19773: iOS: Sample app crashes on start with SQLite error related to analytics
After a few successful builds to my iPhone 6S the new [3D Touch Sample App|https://github.com/appcelerator-developer-relations/appc-sample-3dtouch] started crashing when launched. The only way to fix it was to remove the app and then redeploy it. Replacing the app with a new build without removing it didn't resolve it. A full crash log attached, which makes it more clear this is related to our analytics. Our analytics should me as fool-proof as we can make it. We should catch all exceptions to prevent the app from crashing even though that means analytics is no longer working. *Console* {code} -- Start application log ----------------------------------------------------- [DEBUG] Reading stylesheet from: /var/mobile/Containers/Bundle/Application/9A562E87-3A7A-47B9-A9D7-F2B7FD09BFB4/3D Touch.app/stylesheet.plist [INFO] 3D Touch/1.0.0 (5.1.0.c5877a0) [DEBUG] Loading: /var/mobile/Containers/Bundle/Application/9A562E87-3A7A-47B9-A9D7-F2B7FD09BFB4/3D Touch.app/app.js, Resource: app_js [ERROR] Error occurred calling next on a PLSqliteResultSet. SQLite error: 'database disk image is malformed' for 'SELECT * from event_sequence' [DEBUG] Loading: /var/mobile/Containers/Bundle/Application/9A562E87-3A7A-47B9-A9D7-F2B7FD09BFB4/3D Touch.app/alloy.js, Resource: alloy_js [ERROR] The application has crashed with an uncaught exception 'PLSqliteException'. [ERROR] Reason: [ERROR] occurred calling next on a PLSqliteResultSet. SQLite error: 'database disk image is malformed' for 'SELECT * from event_sequence' [ERROR] Stack trace: [ERROR] [ERROR] 0 CoreFoundation 0x000000018296cf5c + 124 [ERROR] 1 libobjc.A.dylib 0x0000000197e5bf80 objc_exception_throw + 56 [ERROR] 2 CoreFoundation 0x000000018296cea4 + 0 [ERROR] 3 3D Touch 0x000000010050ed94 3D Touch + 4517268 [ERROR] 4 3D Touch 0x0000000100509628 3D Touch + 4494888 [ERROR] 5 libdispatch.dylib 0x0000000198649770 + 16 [ERROR] 6 libdispatch.dylib 0x00000001986549c4 + 100 [ERROR] 7 3D Touch 0x0000000100509548 3D Touch + 4494664 [ERROR] 8 3D Touch 0x000000010050a2d0 3D Touch + 4498128 [ERROR] 9 3D Touch 0x000000010050c2bc 3D Touch + 4506300 [ERROR] 10 libdispatch.dylib 0x00000001986497b0 + 24 [ERROR] 11 libdispatch.dylib 0x0000000198649770 + 16 [ERROR] 12 libdispatch.dylib 0x000000019865575c + 864 [ERROR] 13 libdispatch.dylib 0x000000019864d274 + 464 [ERROR] 14 libdispatch.dylib 0x0000000198649770 + 16 [ERROR] 15 libdispatch.dylib 0x0000000198657bb0 + 2140 [ERROR] 16 libdispatch.dylib 0x000000019865734c + 112 [ERROR] 17 libsystem_pthread.dylib 0x000000019885d478 _pthread_wqthread + 1092 [ERROR] 18 libsystem_pthread.dylib 0x000000019885d028 start_wqthread + 4 [ERROR] *** Terminating app due to uncaught exception 'PLSqliteException', reason: 'Error occurred calling next on a PLSqliteResultSet. SQLite error: 'database disk image is malformed' for 'SELECT * from event_sequence'' [ERROR] *** First throw call stack: [ERROR] (0x18296cf5c 0x197e5bf80 0x18296cea4 0x10050ed94 0x100509628 0x198649770 0x1986549c4 0x100509548 0x10050a2d0 0x10050c2bc 0x1986497b0 0x198649770 0x19865575c 0x19864d274 0x198649770 0x198657bb0 0x19865734c 0x19885d478 0x19885d028) ^C Fokkes-MacBook-Pro:appc-sample-3dtouch fokkezb$ tn iphone-fokke -- End application log ------------------------------------------------------- {code}
Story points: 5