Facebook-ios-sdk: FBSDKEventBindingManager Crash on iOS FacebookCodelessDebugLogEnabled True

Created on 23 Dec 2019  路  11Comments  路  Source: facebook/facebook-ios-sdk

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Xcode Version: 11.2.1 (11B53
  • Objective C
  • Installation Platform & Verison: Cocoapods version 1.7.0

Actual Results

I have many crashes with FBSDKEventBindingManager.m and one error with FBSDKViewHierarchy.m

  • FBSDKViewHierarchy.m line 39
    fb_dispatch_on_main_thread

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x1a6c38020 objc_retain + 16
1 libsystem_blocks.dylib 0x1a6ae9950 _Block_copy + 140
2 libdispatch.dylib 0x1a6bc25e4 _dispatch_Block_copy + 36
3 libdispatch.dylib 0x1a6b6cd30 dispatch_async$VARIANT$mp + 56
4 FBSDKCoreKit 0x10480b758 fb_dispatch_on_main_thread + 39 (FBSDKViewHierarchy.m:39)
5 FBSDKCoreKit 0x1047dadc0 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 288 (FBSDKEventBindingManager.m:288)
6 libdispatch.dylib 0x1a6bc2610 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x1a6bc3184 _dispatch_client_callout + 16
8 libdispatch.dylib 0x1a6b6b6f8 _dispatch_queue_override_invoke + 684
9 libdispatch.dylib 0x1a6b77fa4 _dispatch_root_queue_drain + 376
10 libdispatch.dylib 0x1a6b78770 _dispatch_worker_thread2 + 128
11 libsystem_pthread.dylib 0x1a6c12f48 _pthread_wqthread + 212
12 libsystem_pthread.dylib 0x1a6c15ad4 start_wqthread + 8

Device
Model: iPhone 6s Plus
Orientation: Portrait
RAM free: 45.48 MB
Disk free: 3.14 GB

Operating System
Version: 13.2.2 (17B102)
Orientation: Portrait
Jailbroken: No

  • FBSDKEventBindingManager.m line 289
    __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2

Crashed: com.apple.root.default-qos
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000baa4be2c0

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x1b4412090 objc_msgSend + 16
1 FBSDKCoreKit 0x102deaba0 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 289 (FBSDKEventBindingManager.m:289)
2 libdispatch.dylib 0x1b43ba610 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x1b43bb184 _dispatch_client_callout + 16
4 libdispatch.dylib 0x1b43636f8 _dispatch_queue_override_invoke + 684
5 libdispatch.dylib 0x1b436ffa4 _dispatch_root_queue_drain + 376
6 libdispatch.dylib 0x1b4370770 _dispatch_worker_thread2 + 128
7 libsystem_pthread.dylib 0x1b440af48 _pthread_wqthread + 212
8 libsystem_pthread.dylib 0x1b440dad4 start_wqthread + 8

Device
Model: iPhone 7
Orientation: Portrait
RAM free: 42.5 MB
Disk free: 5.3 GB

Operating System
Version: 13.2.0 (17B84)
Orientation: Portrait
Jailbroken: No

  • FBSDKEventBindingManager.m line 280
    __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2

Crashed: com.apple.root.default-qos
EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000000000

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x1aebbf53c objc_msgSend + 28
1 FBSDKCoreKit 0x101085e48 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 280 (FBSDKEventBindingManager.m:280)
2 libdispatch.dylib 0x1af40ca38 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x1af40d7d4 _dispatch_client_callout + 16
4 libdispatch.dylib 0x1af3b1c80 _dispatch_queue_override_invoke + 684
5 libdispatch.dylib 0x1af3be030 _dispatch_root_queue_drain + 372
6 libdispatch.dylib 0x1af3be8d4 _dispatch_worker_thread2 + 128
7 libsystem_pthread.dylib 0x1af5ee1b4 _pthread_wqthread + 464
8 libsystem_pthread.dylib 0x1af5f0cd4 start_wqthread + 4

Device
Model: iPhone 5s
Orientation: Portrait
RAM free: 146.67 MB
Disk free: 1.82 GB

Operating System
Version: 12.4.4 (16G140)
Orientation: Portrait
Jailbroken: No

Steps to Reproduce

I cannot reproduce the crash I only see it on the crashlytics

Code Samples & Details

I guess issue is related with FacebookAutoLogAppEventsEnabled true, I am not sure of it
Here is how my info.plist file

<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
<key>FacebookAppID</key>
<string>XXXXXXXXXXXX</string>
<key>FacebookAutoLogAppEventsEnabled</key>
<true/>
<key>FacebookCodelessDebugLogEnabled</key>
<true/>
<key>FacebookDisplayName</key>
<string>XXXXXX</string>

All 11 comments

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

Hello bot, I am still facing with the issue and need help

Hi, could you tell us what SDK version you are using now? And if can, could you tell us your app id and paste the latest stack trace? We are working on solving this issue now. Thanks.

Hi @Oliverccccct
I'm not sure if this is the same case. I also facing this issue even though my app has FacebookCodelessDebugLogEnabled disabled

<key>FacebookCodelessDebugLogEnabled</key>
<false/>

The crash came up since we upgraded to FBSDKCoreKit 6.0
Here is my app configuration:

AppID: 2221597074727260
FBSDKCoreKit 6.2.0 
FBSDKLoginKit 6.2.0 

Stack trace:

Crashed: com.apple.root.default-qos
0  libobjc.A.dylib                0x1819149b0 objc_msgSend + 16
1  FBSDKCoreKit                   0x103e67ea0 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 268
2  libdispatch.dylib              0x1818a2ec4 _dispatch_call_block_and_release + 32
3  libdispatch.dylib              0x1818a433c _dispatch_client_callout + 20
4  libdispatch.dylib              0x1818a67b4 _dispatch_queue_override_invoke + 672
5  libdispatch.dylib              0x1818b35c0 _dispatch_root_queue_drain + 348
6  libdispatch.dylib              0x1818b3d9c _dispatch_worker_thread2 + 116
7  libsystem_pthread.dylib        0x18190b6d8 _pthread_wqthread + 216
8  libsystem_pthread.dylib        0x1819119c8 start_wqthread + 8

com.apple.main-thread
0  libobjc.A.dylib                0x1819283f0 lookUpImpOrForward + 136
1  libobjc.A.dylib                0x181914d60 _objc_msgSend_uncached + 64
2  FBSDKCoreKit                   0x103e47280 +[FBSDKAppEventsDeviceInfo _getCarrier] + 32
3  FBSDKCoreKit                   0x103e46be4 -[FBSDKAppEventsDeviceInfo _collectGroup1Data] + 52
4  FBSDKCoreKit                   0x103e467a4 -[FBSDKAppEventsDeviceInfo encodedDeviceInfo] + 80
5  FBSDKCoreKit                   0x103e46608 +[FBSDKAppEventsDeviceInfo extendDictionaryWithDeviceInfo:] + 80
6  FBSDKCoreKit                   0x103e488ec +[FBSDKAppEventsUtility activityParametersDictionaryForEvent:implicitEventsOnly:shouldAccessAdvertisingID:] + 720
7  FBSDKCoreKit                   0x103e45858 __45-[FBSDKAppEvents flushOnMainQueue:forReason:]_block_invoke + 200
8  FBSDKCoreKit                   0x103e44894 __43-[FBSDKAppEvents fetchServerConfiguration:]_block_invoke + 308
9  FBSDKCoreKit                   0x103e8f480 +[FBSDKServerConfigurationManager _didProcessConfigurationFromNetwork:appID:error:] + 944
10 FBSDKCoreKit                   0x103e8ead0 +[FBSDKServerConfigurationManager processLoadRequestResponse:error:appID:] + 1972
11 FBSDKCoreKit                   0x103e79470 __69+[FBSDKGraphRequestPiggybackManager addServerConfigurationPiggyback:]_block_invoke + 68
12 FBSDKCoreKit                   0x103e77cf4 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] + 152
13 FBSDKCoreKit                   0x103e755bc __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke + 144
14 FBSDKCoreKit                   0x103e754b0 -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] + 680
15 FBSDKCoreKit                   0x103e750c0 __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke + 376
16 CoreFoundation                 0x181bd64e0 __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
17 CoreFoundation                 0x181ad3f98 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 196
18 FBSDKCoreKit                   0x103e74e84 -[FBSDKGraphRequestConnection completeWithResults:networkError:] + 528
19 FBSDKCoreKit                   0x103e74338 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] + 828
20 FBSDKCoreKit                   0x103e72490 __36-[FBSDKGraphRequestConnection start]_block_invoke_3 + 80
21 libdispatch.dylib              0x1818a2ec4 _dispatch_call_block_and_release + 32
22 libdispatch.dylib              0x1818a433c _dispatch_client_callout + 20
23 libdispatch.dylib              0x1818b0600 _dispatch_main_queue_callback_4CF + 832
24 CoreFoundation                 0x181b7f41c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
25 CoreFoundation                 0x181b7a034 __CFRunLoopRun + 1708
26 CoreFoundation                 0x181b79660 CFRunLoopRunSpecific + 480
27 GraphicsServices               0x18bf8a604 GSEventRunModal + 164
28 UIKitCore                      0x185d4e15c UIApplicationMain + 1944
29 Longtunman                     0x1024ffe5c main + 27 (AppDelegate.swift:27)
30 libdyld.dylib                  0x1819f51ec start + 4

Hi, could you tell us what SDK version you are using now? And if can, could you tell us your app id and paste the latest stack trace? We are working on solving this issue now. Thanks.

Hello @Oliverccccct ,

Sorry for my late reply. I am having different kind of errors. Previously I wrote as "I guess issue is related with FacebookAutoLogAppEventsEnabled true, I am not sure of it" I have changed the flag to false but it also didn't help to remove errors.

My App Id: 2288489041384088
Facebook SDK 6.0.0

Stack Trace 1
FBSDKViewHierarchy.m line 43

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x190eee980 objc_retain + 16
1 libsystem_blocks.dylib 0x190d9f954 _Block_copy + 140
2 libdispatch.dylib 0x190e76974 _dispatch_Block_copy + 28
3 libdispatch.dylib 0x190e524c8 dispatch_async$VARIANT$armv81 + 56
4 FBSDKCoreKit 0x102b035dc fb_dispatch_on_main_thread + 43 (FBSDKViewHierarchy.m:43)
5 FBSDKCoreKit 0x102ad2a88 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 292 (FBSDKEventBindingManager.m:292)
6 libdispatch.dylib 0x190e769a8 _dispatch_call_block_and_release + 24
7 libdispatch.dylib 0x190e77524 _dispatch_client_callout + 16
8 libdispatch.dylib 0x190e50f38 _dispatch_queue_override_invoke + 668
9 libdispatch.dylib 0x190e5d534 _dispatch_root_queue_drain + 344
10 libdispatch.dylib 0x190e5dcd0 _dispatch_worker_thread2 + 112
11 libsystem_pthread.dylib 0x190ec8b38 _pthread_wqthread + 212
12 libsystem_pthread.dylib 0x190ecb740 start_wqthread + 8

com.apple.main-thread
0 libsystem_kernel.dylib 0x190fa88b8 kevent_id + 8
1 libdispatch.dylib 0x190e650b0 _dispatch_kq_poll + 216
2 libdispatch.dylib 0x190e65aa8 _dispatch_event_loop_wait_for_ownership$VARIANT$armv81 + 400
3 libdispatch.dylib 0x190e5b488 __DISPATCH_WAIT_FOR_QUEUE__ + 304
4 libdispatch.dylib 0x190e5b0a8 _dispatch_sync_f_slow + 140
5 CoreTelephony 0x1959a139c -[CoreTelephonyClientMux synchronousProxyWithErrorHandler:] + 144
6 CoreTelephony 0x1959a83ac -[CoreTelephonyClient synchronousProxyWithErrorHandler:] + 24
7 CoreTelephony 0x1959a7e2c -[CoreTelephonyClient getDescriptorsForDomain:error:] + 156
8 CoreTelephony 0x19599a43c -[CTTelephonyNetworkInfo descriptors] + 68
9 CoreTelephony 0x195999214 -[CTTelephonyNetworkInfo initWithClient:] + 472
10 CoreTelephony 0x195998fe0 -[CTTelephonyNetworkInfo init] + 92
11 FBSDKCoreKit 0x102ab1ac0 +[FBSDKAppEventsDeviceInfo _getCarrier] + 273 (FBSDKAppEventsDeviceInfo.m:273)
12 FBSDKCoreKit 0x102ab1418 -[FBSDKAppEventsDeviceInfo _collectGroup1Data] + 182 (FBSDKAppEventsDeviceInfo.m:182)
13 FBSDKCoreKit 0x102ab0fd8 -[FBSDKAppEventsDeviceInfo encodedDeviceInfo] + 123 (FBSDKAppEventsDeviceInfo.m:123)
14 FBSDKCoreKit 0x102ab0e3c +[FBSDKAppEventsDeviceInfo extendDictionaryWithDeviceInfo:] + 78 (FBSDKAppEventsDeviceInfo.m:78)
15 FBSDKCoreKit 0x102ab3108 +[FBSDKAppEventsUtility activityParametersDictionaryForEvent:implicitEventsOnly:shouldAccessAdvertisingID:] + 83 (once.h:83)
16 FBSDKCoreKit 0x102ab008c __45-[FBSDKAppEvents flushOnMainQueue:forReason:]_block_invoke + 1291 (FBSDKAppEvents.m:1291)
17 FBSDKCoreKit 0x102aaf0c8 __43-[FBSDKAppEvents fetchServerConfiguration:]_block_invoke + 1106 (FBSDKAppEvents.m:1106)
18 FBSDKCoreKit 0x102af780c +[FBSDKServerConfigurationManager _didProcessConfigurationFromNetwork:appID:error:] + 417 (FBSDKServerConfigurationManager.m:417)
19 FBSDKCoreKit 0x102af6e5c +[FBSDKServerConfigurationManager processLoadRequestResponse:error:appID:] + 261 (FBSDKServerConfigurationManager.m:261)
20 FBSDKCoreKit 0x102ae4a5c __69+[FBSDKGraphRequestPiggybackManager addServerConfigurationPiggyback:]_block_invoke + 155 (FBSDKGraphRequestPiggybackManager.m:155)
21 FBSDKCoreKit 0x102ae32e0 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] + 41 (FBSDKGraphRequestMetadata.m:41)
22 FBSDKCoreKit 0x102ae0ba8 __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke + 806 (FBSDKGraphRequestConnection.m:806)
23 FBSDKCoreKit 0x102ae0a9c -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] + 839 (FBSDKGraphRequestConnection.m:839)
24 FBSDKCoreKit 0x102ae06ac __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke + 788 (FBSDKGraphRequestConnection.m:788)
25 CoreFoundation 0x191184c7c __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 16
26 CoreFoundation 0x191088cdc -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 192
27 FBSDKCoreKit 0x102ae0470 -[FBSDKGraphRequestConnection completeWithResults:networkError:] + 767 (FBSDKGraphRequestConnection.m:767)
28 FBSDKCoreKit 0x102adf924 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] + 634 (FBSDKGraphRequestConnection.m:634)
29 FBSDKCoreKit 0x102adda7c __36-[FBSDKGraphRequestConnection start]_block_invoke_3 + 242 (FBSDKGraphRequestConnection.m:242)
30 libdispatch.dylib 0x190e769a8 _dispatch_call_block_and_release + 24
31 libdispatch.dylib 0x190e77524 _dispatch_client_callout + 16
32 libdispatch.dylib 0x190e5a6fc _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 860
33 CoreFoundation 0x19112f748 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
34 CoreFoundation 0x19112a61c __CFRunLoopRun + 1724
35 CoreFoundation 0x191129c34 CFRunLoopRunSpecific + 424
36 GraphicsServices 0x19b27338c GSEventRunModal + 160
37 UIKitCore 0x19525c22c UIApplicationMain + 1932
38 lookAtMe 0x1024c4cac main + 14 (main.m:14)
39 libdyld.dylib 0x190fb1800 start + 4

Stack Trace 2
FBSDKEventBindingManager.m line 284

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x1a41ecfc0 objc_msgSend + 32
1 libobjc.A.dylib 0x1a420b278 objc_retain + 88
2 FBSDKCoreKit 0x1032b279c __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 284 (FBSDKEventBindingManager.m:284)
3 libdispatch.dylib 0x1a417cb7c _dispatch_call_block_and_release + 32
4 libdispatch.dylib 0x1a417dfd8 _dispatch_client_callout + 20
5 libdispatch.dylib 0x1a4180414 _dispatch_queue_override_invoke + 672
6 libdispatch.dylib 0x1a418cbd4 _dispatch_root_queue_drain + 348
7 libdispatch.dylib 0x1a418d384 _dispatch_worker_thread2 + 120
8 libsystem_pthread.dylib 0x1a41e3690 _pthread_wqthread + 216
9 libsystem_pthread.dylib 0x1a41e99e8 start_wqthread + 8

Stack Trace 3
FBSDKEventBindingManager.m line 285

Crashed: com.apple.root.default-qos
0 libobjc.A.dylib 0x1ac2fcfb0 objc_msgSend + 16
1 FBSDKCoreKit 0x10534a814 __47-[FBSDKEventBindingManager matchView:delegate:]_block_invoke_2 + 285 (FBSDKEventBindingManager.m:285)
2 libdispatch.dylib 0x1ac28cb7c _dispatch_call_block_and_release + 32
3 libdispatch.dylib 0x1ac28dfd8 _dispatch_client_callout + 20
4 libdispatch.dylib 0x1ac290414 _dispatch_queue_override_invoke + 672
5 libdispatch.dylib 0x1ac29cbd4 _dispatch_root_queue_drain + 348
6 libdispatch.dylib 0x1ac29d384 _dispatch_worker_thread2 + 120
7 libsystem_pthread.dylib 0x1ac2f3690 _pthread_wqthread + 216
8 libsystem_pthread.dylib 0x1ac2f99e8 start_wqthread + 8

Thank you

Hi, @BaranBerk @chalermpong
Thanks for providing stacktrace! That would be pretty helpful for investigation. You could follow the link below:
https://developers.facebook.com/docs/app-events/codeless-app-events
FacebookCodelessDebugLogEnabled

to turn off the feature.
Hope the information could help you.

Hi @Oliverccccct
Is there any update on the issue. When I enabled zombies I found that issue this might help.
Thank you
Screen Shot 2020-04-18 at 18 26 54

Hi, @BaranBerk @chalermpong ,

Thanks for your help! The problem should be fixed in our latest SDK version 6.4.0. Could you upgrade to that version and help to check if there is the same problem?

Hi @Oliverccccct ,
Thank you. Once I prepare the new release I will give updates from here

Hi @Oliverccccct
My app was released with FBSDK 6.4.0 for almost a week now, this issue doesn't exist anymore.
Thank you very much.

Hi @Oliverccccct ,
It seems all is fixed. Thank you

Was this page helpful?
0 / 5 - 0 ratings