Leanplum / Leanplum-iOS-SDK

Leanplum's integrated solution delivers meaningful engagement across messaging and the in-app experience.
https://www.leanplum.com
Apache License 2.0
71 stars 59 forks source link

App Startup Crash [LPDatabase runQuery:bindObjects:] #576

Open pram-quadrant opened 5 months ago

pram-quadrant commented 5 months ago

Expected Behavior

No early start crash

Actual Behavior

Intermittent start crash

Steps to Reproduce the Problem

This is an Intermittent start crash reported to Crashlytics that we have not been able to reproduce. Furthermore, we have another service using SQLite3 in its implementation, so it is possible that this is occurring due to a dependency conflict of some kind.

We are curious about what you recommend for preventing a race condition with this other service using SQLite3.

Specifications

Crashed: NSOperationQueue 0x106824f10 (QOS: UNSPECIFIED)
0  libsystem_platform.dylib       0x620c _os_unfair_lock_unowned_abort + 36
1  libsystem_platform.dylib       0x1768 _os_unfair_lock_unlock_slow + 96
2  libsqlite3.dylib               0x6380 sqlite3_snprintf + 4584
3  libsqlite3.dylib               0x60c8 sqlite3_snprintf + 3888
4  libsqlite3.dylib               0x47b08 sqlite3_free_table + 28664
5  libsqlite3.dylib               0x4b4d4 sqlite3_free_table + 43460
6  libsqlite3.dylib               0x4ad78 sqlite3_free_table + 41576
7  libsqlite3.dylib               0x32988 sqlite3_step + 30636
8  libsqlite3.dylib               0x2b5b4 sqlite3_step + 984
9  XXXXXXX                      0x3e907c -[LPDatabase runQuery:bindObjects:] + 108
10 XXXXXXX                     0x3d99dc +[LPEventDataManager addEvent:] + 140
11 XXXXXXX                      0x411944 __31-[LPRequestSender saveRequest:]_block_invoke + 432
12 Foundation                     0xa6ef4 __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 24
13 Foundation                     0x7b000 -[NSBlockOperation main] + 104
14 Foundation                     0x7af90 __NSOPERATION_IS_INVOKING_MAIN__ + 16
15 Foundation                     0x3c4b8 -[NSOperation start] + 708
16 Foundation                     0x3c1ec __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 16
17 Foundation                     0x4187c __NSOQSchedule_f + 172
18 libdispatch.dylib              0x12fc4 _dispatch_block_async_invoke2 + 148
19 libdispatch.dylib              0x3eac _dispatch_client_callout + 20
20 libdispatch.dylib              0x7330 _dispatch_continuation_pop + 504
21 libdispatch.dylib              0x6998 _dispatch_async_redirect_invoke + 584
22 libdispatch.dylib              0x15944 _dispatch_root_queue_drain + 396
23 libdispatch.dylib              0x16158 _dispatch_worker_thread2 + 164
24 libsystem_pthread.dylib        0xda0 _pthread_wqthread + 228
25 libsystem_pthread.dylib        0xb7c start_wqthread + 8

crash_info_entry_0 | BUG IN CLIENT OF LIBPLATFORM: Unlock of an os_unfair_lock not owned by current thread