signalfx/splunk-otel-ios

CFDictionaryGetValue Network Instrumentation Crash

Closed this issue · 5 comments

Description

We attempted to implement Splunk into our app and found some crash regarding CFDictionaryGetValue.

Crashed: com.apple.main-thread
0  CoreFoundation                 0x6b5dc CFDictionaryGetValue + 100
1  Foundation                     0x108c94 _NSSetLongLongValueAndNotify + 92
2  CFNetwork                      0x1da35c _CFNetworkHTTPConnectionCacheSetLimit + 152148
3  libdispatch.dylib              0x2a84 _dispatch_call_block_and_release + 32
4  libdispatch.dylib              0x481c _dispatch_client_callout + 20
5  libdispatch.dylib              0x12c70 _dispatch_main_queue_callback_4CF + 884
6  CoreFoundation                 0xa3340 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
7  CoreFoundation                 0x9d218 __CFRunLoopRun + 2524
8  CoreFoundation                 0x9c308 CFRunLoopRunSpecific + 600
9  GraphicsServices               0x3734 GSEventRunModal + 164
10 UIKitCore                      0xbca75c -[UIApplication _run] + 1072
11 UIKitCore                      0xbcffcc UIApplicationMain + 168
12 Skywalker                      0xf64108 main + 26
13 libdyld.dylib                  0x1cf8 start + 4

We found that there are crash with similar stack trace produced on other framework, such as Sentry. They fixed the crash by swizzling setState method instead of using KVO to observe network request state.

Hi @mattxw . I have a few questions to clarify.

  1. What version of Alamofire/AFNetworking are you using in the app?
  2. What type of network request where this crash is occurring?
  3. Could you create a simple public repo (sample app) where you can reproduce the issue? (And include the steps)

Thanks.

Thanks for the response, @jek-bao-choo! We are not using Alamofire right now, the link attached are reference to this crash issue that also happened on other framework in the past.

As for the type of network request and how to reproduce, we still don't have it yet since the issue only shows up on Firebase Crashlytics.

Cc: @Piyush23786

@Piyush23786 Any other further clarification required?

seemk commented

Fixed in #132