4

我有一个使用 Parse.com iOS SDK 和本地数据存储 ( [PFObject pin]) 的生产应用程序。

正如我们从崩溃线程的 Crashlytics 报告中看到的那样,我们的一些用户在生产中遇到了这种崩溃:

Thread : Crashed: com.parse.sqlite.db.queue
0  libsqlite3.dylib               0x000000019b269f58 (null) + 9096
1  libsqlite3.dylib               0x000000019b25315c (null) + 85124
2  libsqlite3.dylib               0x000000019b25315c (null) + 85124
3  libsqlite3.dylib               0x000000019b21bd68 (null) + 3028
4  libsqlite3.dylib               0x000000019b2530c0 (null) + 84968
5  libsqlite3.dylib               0x000000019b245848 (null) + 29552
6  libsqlite3.dylib               0x000000019b225794 (null) + 13080
7  libsqlite3.dylib               0x000000019b224634 (null) + 8632
8  libsqlite3.dylib               0x000000019b223734 (null) + 4792
9  libsqlite3.dylib               0x000000019b222fa4 (null) + 2856
10 libsqlite3.dylib               0x000000019b222c5c (null) + 2016
11 Parse                          0x00000001009a9c20 -[PFSQLiteDatabase _executeQueryAsync:withArgumentsInArray:cachingEnabled:] (PFSQLiteDatabase.m:178)
12 Bolts                          0x000000010061d034 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 (BFTask.m:334)
13 libdispatch.dylib              0x000000019b5457b0 _dispatch_call_block_and_release + 24
14 libdispatch.dylib              0x000000019b545770 _dispatch_client_callout + 16
15 libdispatch.dylib              0x000000019b55175c _dispatch_queue_drain + 864
16 libdispatch.dylib              0x000000019b549274 _dispatch_queue_invoke + 464
17 libdispatch.dylib              0x000000019b545770 _dispatch_client_callout + 16
18 libdispatch.dylib              0x000000019b553bb0 _dispatch_root_queue_drain + 2140
19 libdispatch.dylib              0x000000019b55334c _dispatch_worker_thread3 + 112
20 libsystem_pthread.dylib        0x000000019b759478 _pthread_wqthread + 1092

我的假设是当数据库模式在应用程序升级之间发生变化时会发生这种情况,但这几乎是纯粹的猜测。

我正在寻找的是看看是否有人知道任何方法来防止这种崩溃的发生,可能是通过捕获异常或通过设置一些 SDK 配置属性。

我们的固定对象仅用于捕获数据和用户会话,如果需要可以安全删除。

更新:2015 年 11 月 23 日

我们在应用程序启动时不断遇到 Parse SDK (1.9.1) 的这个问题。似乎当 Parse.com 后端的数据模型发生变化并且与固定对象的数据模型不同时,应用程序总是崩溃一次。下次运行时,一切正常。

重现的可能步骤(不是 100% 确定):

  1. 从 Parse.com 加载对象
  2. 在本地固定对象
  3. 完全关闭应用程序
  4. 通过添加新列来更新 Parse.com 中的模型
  5. 启动应用程序
  6. 重复步骤 1 和 2
  7. 碰撞
  8. 再次启动应用程序
  9. 重复步骤 1 和 2
  10. 一切正常

这是另一个可能有助于调试问题的崩溃报告:

Thread : Crashed: com.parse.sqlite.db.queue
0  libsqlite3.dylib               0x19ac05f58 (null) + 9096
1  libsqlite3.dylib               0x19abdc020 (null) + 6984
2  libsqlite3.dylib               0x19abdc020 (null) + 6984
3  libsqlite3.dylib               0x19abdbe2c (null) + 6484
4  libsqlite3.dylib               0x19abc1cc0 (null) + 14404
5  libsqlite3.dylib               0x19abc0634 (null) + 8632
6  libsqlite3.dylib               0x19abbf734 (null) + 4792
7  libsqlite3.dylib               0x19abbefa4 (null) + 2856
8  libsqlite3.dylib               0x19abbec5c (null) + 2016
9  Parse                          0x100de8bc8 -[PFSQLiteDatabase _executeQueryAsync:withArgumentsInArray:cachingEnabled:] (PFSQLiteDatabase.m:176)
10 Bolts                          0x1006c6fec __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 (BFTask.m:336)
11 libdispatch.dylib              0x19aee17b0 _dispatch_call_block_and_release + 24
12 libdispatch.dylib              0x19aee1770 _dispatch_client_callout + 16
13 libdispatch.dylib              0x19aeed75c _dispatch_queue_drain + 864
14 libdispatch.dylib              0x19aee5274 _dispatch_queue_invoke + 464
15 libdispatch.dylib              0x19aee1770 _dispatch_client_callout + 16
16 libdispatch.dylib              0x19aeefbb0 _dispatch_root_queue_drain + 2140
17 libdispatch.dylib              0x19aeef34c _dispatch_worker_thread3 + 112
18 libsystem_pthread.dylib        0x19b0f5478 _pthread_wqthread + 1092
19 libsystem_pthread.dylib        0x19b0f5028 start_wqthread + 4

另一个:

Thread : Crashed: com.parse.sqlite.db.queue
0  libsqlite3.dylib               0x195959bb8 (null) + 31936
1  libsqlite3.dylib               0x195959bb4 (null) + 31932
2  libsqlite3.dylib               0x195952108 sqlite3_step + 528
3  Parse                          0x100e7e330 -[PFSQLiteDatabaseResult step] (PFSQLiteDatabaseResult.m:39)
4  Parse                          0x100e7e2ec -[PFSQLiteDatabaseResult next] (PFSQLiteDatabaseResult.m:35)
5  Parse                          0x100e59ce4 __52-[PFOfflineStore _getPointerAsyncWithUUID:database:]_block_invoke (PFOfflineStore.m:897)
6  Bolts                          0x100727748 __62-[BFTask continueWithExecutor:successBlock:cancellationToken:]_block_invoke (BFTask.m:410)
7  Bolts                          0x100726fec __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 (BFTask.m:336)
8  Bolts                          0x100724d5c __29+[BFExecutor defaultExecutor]_block_invoke_2 (BFExecutor.m:45)
9  Bolts                          0x100725270 -[BFExecutor execute:] (BFExecutor.m:109)
10 Bolts                          0x100726f64 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke (BFTask.m:328)
11 Bolts                          0x100726b70 -[BFTask runContinuations] (BFTask.m:308)
12 Bolts                          0x1007263e0 -[BFTask trySetResult:] (BFTask.m:200)
13 Bolts                          0x100726314 -[BFTask setResult:] (BFTask.m:187)
14 Bolts                          0x100727e4c -[BFTaskCompletionSource setResult:] (BFTaskCompletionSource.m:52)
15 Bolts                          0x1007272ac __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_3 (BFTask.m:352)
16 Bolts                          0x1007270a0 __55-[BFTask continueWithExecutor:block:cancellationToken:]_block_invoke_2 (BFTask.m:360)
17 libdispatch.dylib              0x195c313ac _dispatch_call_block_and_release + 24
18 libdispatch.dylib              0x195c3136c _dispatch_client_callout + 16
19 libdispatch.dylib              0x195c3b4c0 _dispatch_queue_drain + 1216
20 libdispatch.dylib              0x195c34474 _dispatch_queue_invoke + 132
21 libdispatch.dylib              0x195c3d224 _dispatch_root_queue_drain + 664
22 libdispatch.dylib              0x195c3e75c _dispatch_worker_thread3 + 108
23 libsystem_pthread.dylib        0x195e0d2e4 _pthread_wqthread + 816
24 libsystem_pthread.dylib        0x195e0cfa8 start_wqthread + 4
4

1 回答 1

0

将 parse sdk 更新到最新版本,同时避免使用 cocapods 尝试手动安装。Cocca pods arents 和 bower for js 一样稳定。

于 2015-11-05T10:03:10.217 回答