AppsFlyerSDK / AppsFlyerFramework

AppsFlyer Apple SDK
https://support.appsflyer.com/hc/en-us/articles/207032066-AppsFlyer-SDK-Integration-iOS
Other
164 stars 89 forks source link

Multiple crashes #187

Closed DagAgren closed 2 years ago

DagAgren commented 2 years ago

Report

SDK Version

6.3.4

What happened?

We are seeing multiple crashes inside the AppsFlyer framework in our app in production. None are easily reproducible while developing, but they are among our top crashes in Crashlytics. The crashes look as follows:

Crash 1 in AFSDKPerformance

Crashed: afsdk-inner-buffer-serial
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000008

Crashed: afsdk-inner-buffer-serial
0  CoreFoundation                 0x1a8ad6ee0 -[__NSDictionaryM objectForKeyedSubscript:] + 148
1  WoltClient Production          0x1034581d8 +[AFSDKPerformance infoForKey:] + 4308287960
2  WoltClient Production          0x1034712a8 __60-[AppsFlyerLib __executeRequestWithEvent:completionHandler:]_block_invoke_2 + 4308390568
3  libdispatch.dylib              0x1a88a35ac _dispatch_client_callout + 20
4  libdispatch.dylib              0x1a88a4cd0 _dispatch_once_callout + 32
5  WoltClient Production          0x103471148 __60-[AppsFlyerLib __executeRequestWithEvent:completionHandler:]_block_invoke + 4308390216
6  Foundation                     0x1a8fe4d70 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 24
7  Foundation                     0x1a8fe4830 __NSOQSchedule_f + 184
8  libdispatch.dylib              0x1a88aff24 _dispatch_block_async_invoke2 + 144
9  libdispatch.dylib              0x1a88a35ac _dispatch_client_callout + 20
10 libdispatch.dylib              0x1a88a9a64 _dispatch_lane_serial_drain + 568
11 libdispatch.dylib              0x1a88aa498 _dispatch_lane_invoke + 400
12 libdispatch.dylib              0x1a88b3a5c _dispatch_workloop_worker_thread + 584
13 libsystem_pthread.dylib        0x1a8909718 _pthread_wqthread + 276
14 libsystem_pthread.dylib        0x1a890f9c8 start_wqthread + 8

Crash 2, also in AFSDKPerformance

Crashed: afsdk-inner-buffer-serial
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: afsdk-inner-buffer-serial
0  CoreFoundation                 0x1825b93fc mdict_removeObjectForKey + 148
1  WoltClient Production          0x1056812e0 +[AFSDKPerformance infoForKeyAndRemove:] + 4378170080
2  WoltClient Production          0x1056999b0 __60-[AppsFlyerLib __executeRequestWithEvent:completionHandler:]_block_invoke + 4378270128
3  Foundation                     0x18384d7c0 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 20
4  Foundation                     0x18384d28c __NSOQSchedule_f + 180
5  libdispatch.dylib              0x182175b34 _dispatch_block_async_invoke2 + 104
6  libdispatch.dylib              0x182193298 _dispatch_client_callout + 16
7  libdispatch.dylib              0x18216f344 _dispatch_lane_serial_drain$VARIANT$armv81 + 568
8  libdispatch.dylib              0x18216fe2c _dispatch_lane_invoke$VARIANT$armv81 + 400
9  libdispatch.dylib              0x18217966c _dispatch_workloop_worker_thread + 692
10 libsystem_pthread.dylib        0x1ca9fd5bc _pthread_wqthread + 272
11 libsystem_pthread.dylib        0x1caa0086c start_wqthread + 8

Crash 3 in AppsFlyerLib

Crashed: com.appsflyer.serial
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000b392280d0

Crashed: com.appsflyer.serial
0  libobjc.A.dylib                0x1bb2f0154 objc_msgSend + 20
1  WoltClient Production          0x102efa84c -[AppsFlyerLib getEventParameters:] + 4345882700
2  WoltClient Production          0x102efd620 -[AppsFlyerLib callServerWithEventName:eventValues:options:completion:] + 4345894432
3  libdispatch.dylib              0x1a71b7298 _dispatch_client_callout + 16
4  libdispatch.dylib              0x1a715c028 _dispatch_continuation_pop$VARIANT$mp + 412
5  libdispatch.dylib              0x1a716cd64 _dispatch_source_invoke$VARIANT$mp + 1304
6  libdispatch.dylib              0x1a715f908 _dispatch_lane_serial_drain$VARIANT$mp + 300
7  libdispatch.dylib              0x1a7160518 _dispatch_lane_invoke$VARIANT$mp + 420
8  libdispatch.dylib              0x1a7169fac _dispatch_workloop_worker_thread + 712
9  libsystem_pthread.dylib        0x1efb895bc _pthread_wqthread + 272
10 libsystem_pthread.dylib        0x1efb8c86c start_wqthread + 8

Additional version information

The first two crashes, in AFSDKPerformance, only appeared after upgrading to this version of the SDK. The third crash, in AppsFlyerLib, has been around for a longer time, probably from a much earlier version upgrade, but is still present in 6.3.4.

DagAgren commented 2 years ago

These crashes occur on at least iOS 14 and 13, and the most common one has a few hits on 15 and 12 as well.

The total rate is around 200 per week, which makes it not our most common crash, but in the top list.

andr-ggn commented 2 years ago

@DagAgren Thanks for pointing to a problem! We receiving same crashes from clients which use Unity. You have native? We already investigating the cause of the issue!

isimpson commented 2 years ago

Hi @andr-ggn I work with @DagAgren and yes we have a pure native iOS app.

isimpson commented 2 years ago

@andr-ggn any updates on this? Would be great to get this fixed in our app asap.

CapnSpellcheck commented 2 years ago

I also see crash #2 in my native app.

sergiymomot commented 2 years ago

Same thing, seeing all 3 crashes in our native iOS app Most common crashes for us

af-fess commented 2 years ago

The fix will be released this week, v6.4.1

ge-af commented 2 years ago

The new Unity version v6.4.1 was just released with a fix to this issue.

isimpson commented 2 years ago

@af-fess this is still happening in the iOS sdk v6.4.2 can we re-open and look into this again please.

andr-ggn commented 2 years ago

@isimpson Your crash may not be related to the crash described in the issue. Contact the support and provide useful information

DagAgren commented 2 years ago

We are still seeing the third crash listed in this issue (the one in getEventParameters:).

We are also seeing a fourth one I did not notice earlier, that has been around for the same amount of time:

Crashed: com.appsflyer.serial
0  libobjc.A.dylib                0x4304 object_getMethodImplementation + 68
1  CoreFoundation                 0x2c82c _NSIsNSString + 60
2  Foundation                     0x8cdf8 _NSIsPList + 68
3  Foundation                     0x8cfc8 _NSIsPList + 532
4  Foundation                     0x8cfc8 _NSIsPList + 532
5  Foundation                     0xb2f34 -[NSDictionary(NSDictionary) writeToFile:atomically:] + 92
6  WoltClient Production          0x76e464 +[AFSDKEventCache cacheEvent:] + 4345291876
7  WoltClient Production          0x784c1c -[AppsFlyerLib executeRequestWithUrlString:eventOptions:parameters:completionHandler:] + 4345383964
8  WoltClient Production          0x782420 __71-[AppsFlyerLib callServerWithEventName:eventValues:options:completion:]_block_invoke_2.1031 + 4345373728
9  libdispatch.dylib              0x1c04 _dispatch_call_block_and_release + 32
10 libdispatch.dylib              0x3950 _dispatch_client_callout + 20
11 libdispatch.dylib              0xb0ac _dispatch_lane_serial_drain + 664
12 libdispatch.dylib              0xbc10 _dispatch_lane_invoke + 392
13 libdispatch.dylib              0x16318 _dispatch_workloop_worker_thread + 656
14 libsystem_pthread.dylib        0x11b0 _pthread_wqthread + 288
15 libsystem_pthread.dylib        0xf50 start_wqthread + 8
DagAgren commented 2 years ago

We have not seen the first two crashes yet, so those may have been fixed, but the third one is definitely still there, as well as this fourth one.

DagAgren commented 2 years ago

@andr-ggn Could we re-open this issue since not all the crashes are fixed? Or should I file a new one with the remaining crashes?