ios-branch-deep-linking-attribution: Crash at launch with iOS 14 + Xcode 12b6

image
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFData count]: unrecognized selector sent to instance 0x600002425630'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff2043a11e __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007fff20177f78 objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff20448c6f +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
	3   CoreFoundation                      0x00007fff2043e65e ___forwarding___ + 1489
	4   CoreFoundation                      0x00007fff20440698 _CF_forwarding_prep_0 + 120
	5   WebKit                              0x00007fff28534b2b _ZN3WTF10makeVectorINS_6StringEEENS_6VectorIT_Lm0ENS_15CrashOnOverflowELm16ENS_10FastMallocEEEP7NSArray + 72
	6   WebKit                              0x00007fff2883258b _ZNK6WebKit15WebProcessProxy25platformOverrideLanguagesEv + 109
	7   WebKit                              0x00007fff2889b1d9 _ZN6WebKit15WebProcessProxy16getLaunchOptionsERNS_15ProcessLauncher13LaunchOptionsE + 215
	8   WebKit                              0x00007fff287f1045 _ZN6WebKit21AuxiliaryProcessProxy7connectEv + 53
	9   WebKit                              0x00007fff2889362c _ZN6WebKit14WebProcessPool19createNewWebProcessEPNS_16WebsiteDataStoreENS_15WebProcessProxy11IsPrewarmedE + 104
	10  WebKit                              0x00007fff2885f153 _ZN6WebKit14WebProcessPool27processForRegistrableDomainERNS_16WebsiteDataStoreEPNS_12WebPageProxyERKN7WebCore17RegistrableDomainE + 1831
	11  WebKit                              0x00007fff28894885 _ZN6WebKit14WebProcessPool13createWebPageERNS_10PageClientEON3WTF3RefIN3API17PageConfigurationENS3_13DumbPtrTraitsIS6_EEEE + 335
	12  WebKit                              0x00007fff28bc0f10 -[WKContentView _commonInitializationWithProcessPool:configuration:] + 49
	13  WebKit                              0x00007fff28bc192b -[WKContentView initWithFrame:processPool:configuration:webView:] + 195
	14  WebKit                              0x00007fff287732d3 -[WKWebView _initializeWithConfiguration:] + 1271
	15  WebKit                              0x00007fff2877473a -[WKWebView initWithFrame:configuration:] + 98
	16  WebKit                              0x00007fff28772d79 -[WKWebView initWithFrame:] + 83
	17  ParseTest DEV                       0x000000010bbfa9a4 __56-[BNCUserAgentCollector collectUserAgentWithCompletion:]_block_invoke + 122
	18  libdispatch.dylib                   0x00007fff2010535b _dispatch_call_block_and_release + 12
	19  libdispatch.dylib                   0x00007fff20106534 _dispatch_client_callout + 8
	20  libdispatch.dylib                   0x00007fff20113011 _dispatch_main_queue_callback_4CF + 1045
	21  CoreFoundation                      0x00007fff203a8276 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	22  CoreFoundation                      0x00007fff203a2b06 __CFRunLoopRun + 2685
	23  CoreFoundation                      0x00007fff203a1b9e CFRunLoopRunSpecific + 567
	24  XCTest                              0x000000010de14eaf -[XCTWaiter waitForExpectations:timeout:enforceOrder:] + 823
	25  XCTest                              0x000000010ddaacef -[XCTFuture _waitForFulfillment] + 724
	26  XCTest                              0x000000010ddabd57 -[XCTFuture value] + 32
	27  XCTest                              0x000000010dd9b230 -[XCTestDriver _prepareTestConfigurationAndIDESession] + 803
	28  XCTest                              0x000000010dd9aedd -[XCTestDriver run] + 23
	29  XCTest                              0x000000010de28c28 _XCTestMain + 108
	30  libXCTestBundleInject.dylib         0x000000010dbed992 __copy_helper_block_e8_32s + 0
	31  CoreFoundation                      0x00007fff203a85db __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	32  CoreFoundation                      0x00007fff203a79ef __CFRunLoopDoBlocks + 434
	33  CoreFoundation                      0x00007fff203a240c __CFRunLoopRun + 899
	34  CoreFoundation                      0x00007fff203a1b9e CFRunLoopRunSpecific + 567
	35  GraphicsServices                    0x00007fff2b76edb3 GSEventRunModal + 139
	36  UIKitCore                           0x00007fff24660c73 -[UIApplication _run] + 912
	37  UIKitCore                           0x00007fff24665b84 UIApplicationMain + 101

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 17 (5 by maintainers)

Most upvoted comments

Me too On simulator with iOS 13 On iOS 14 all fine

I have a Mac with M1 chip if that help

Hi @jdee, I believe I’m seeing this crash as well. I’ve tested on both Branch SDK v0.35.0 and v0.36.0 running on the iOS simulator. I’ve been using the SDK fine for the past 6-9 months without any issue before and do not know what configuration changes I’ve made to cause this crash to start to occur. I’ve also performed the standard clean / delete derived data folder but still see the crash.

Environment: MacOS Big Sur 11.1 Xcode 12.3 (12C33) Branch SDK v0.36.0 (also occurs on 0.35.0) Cocoapods 1.10.0 iOS Simulator 13.2

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
    frame #0: 0x0000000126a21947 JavaScriptCore`bmalloc::Heap::Heap(bmalloc::HeapKind, std::__1::lock_guard<bmalloc::Mutex>&) + 2039
    frame #1: 0x0000000126a1dcf5 JavaScriptCore`bmalloc::PerProcess<bmalloc::PerHeapKind<bmalloc::Heap> >::getSlowCase() + 181
    frame #2: 0x0000000126a1e505 JavaScriptCore`bmalloc::PerHeapKindBase<bmalloc::Cache>::PerHeapKindBase<>() + 37
    frame #3: 0x0000000126a1df26 JavaScriptCore`bmalloc::PerThread<bmalloc::PerHeapKind<bmalloc::Cache> >::getSlowCase() + 102
    frame #4: 0x0000000126a1dfe4 JavaScriptCore`bmalloc::Cache::allocateSlowCaseNullCache(bmalloc::HeapKind, unsigned long) + 132
    frame #5: 0x0000000126f8672e JavaScriptCore`JSC::ExecutableAllocator::initialize() + 14
    frame #6: 0x000000012722f8e6 JavaScriptCore`void std::__1::__call_once_proxy<std::__1::tuple<JSC::initializeThreading()::$_0&&> >(void*) + 22
    frame #7: 0x00000001135f0f3c libc++.1.dylib`std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 139
    frame #8: 0x00000001272231dc JavaScriptCore`JSC::initializeThreading() + 60
    frame #9: 0x0000000115d1015c WebKit`WebKit::runInitializationCode(void*) + 19
    frame #10: 0x00000001135f0f3c libc++.1.dylib`std::__1::__call_once(unsigned long volatile&, void*, void (*)(void*)) + 139
    frame #11: 0x0000000115d0da4c WebKit`WebKit::InitializeWebKit2() + 58
    frame #12: 0x0000000115d70e58 WebKit`-[WKWebViewConfiguration init] + 67
    frame #13: 0x0000000115d59ae4 WebKit`-[WKWebView initWithFrame:] + 26
  * frame #14: 0x0000000113b549a5 Branch`__56-[BNCUserAgentCollector collectUserAgentWithCompletion:]_block_invoke(.block_descriptor=0x0000600002075020) at BNCUserAgentCollector.m:91:28
    frame #15: 0x000000011c17edd4 libdispatch.dylib`_dispatch_call_block_and_release + 12
    frame #16: 0x000000011c17fd48 libdispatch.dylib`_dispatch_client_callout + 8
    frame #17: 0x000000011c18dde6 libdispatch.dylib`_dispatch_main_queue_callback_4CF + 1500
    frame #18: 0x000000011920bdf9 CoreFoundation`__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    frame #19: 0x0000000119206a59 CoreFoundation`__CFRunLoopRun + 2329
    frame #20: 0x0000000119205e16 CoreFoundation`CFRunLoopRunSpecific + 438
    frame #21: 0x0000000123c36bb0 GraphicsServices`GSEventRunModal + 65
    frame #22: 0x000000011d387b48 UIKitCore`UIApplicationMain + 1621
    frame #23: 0x0000000105081f8b main at AppDelegate.swift:20:7
    frame #24: 0x000000011c207c25 libdyld.dylib`start + 1
    frame #25: 0x000000011c207c25 libdyld.dylib`start + 1

I’m also having a branch crash on startup with latest branch SDK 0.35.0. I’m on iOS 13 (though 14 crashes too). Seems related to webkit (wkwebview) init thread race condition. Sorry I can’t post my backtrace at this time.

edit: nevermind. seems unrelated. downgrade to 0.34.0 still crashing (likely somewhere else)