Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADJRequestHandler.signWithSigPluginWithMergedParameters function crash issue in Adjust SDK v5 on iOS 18 devices #742

Open
remziyildirim opened this issue Dec 3, 2024 · 3 comments
Assignees

Comments

@remziyildirim
Copy link

Hi,

We upgraded Adjust SDK from v4.38.4 to v5.0.1 about 1.5 month ago. We have started getting occasional crashes on iOS 18 devices since we upgrade it. So far, we have encountered 25 crashes due to this issue. I attached pod versions and an example of the full stack trace message.

Could you please take a look to it?

PODS:

  • Adjust (5.0.1):
    • Adjust/Adjust (= 5.0.1)
  • Adjust/Adjust (5.0.1):
    • AdjustSignature (~> 3.18)
  • AdjustSignature (3.20.2)

Short crash explanation:
-[ADJRequestHandler signWithSigPluginWithMergedParameters:activityKind:clientSdk:urlHostString:]

Crashlytics - Stack trace

com.apple.main-thread
0  CoreFoundation                 0xf0ec CF_IS_OBJC + 100
1  CoreFoundation                 0xca4c CFEqual + 728
2  CoreFoundation                 0x75bcc __NSCacheKeyEqual + 16
3  libcache.dylib                 0x31f4 _entry_get_optionally_checking_collisions + 148
4  libcache.dylib                 0x2fac cache_get + 124
5  CoreFoundation                 0x687e4 -[NSCache objectForKey:] + 192
6  CoreUI                         0xc9a4 -[CUICatalog colorWithName:displayGamut:deviceIdiom:appearanceName:] + 528
7  UIKitCore                      0x1e27d4 -[_UIAssetManager colorNamed:withTraitCollection:] + 148
8  UIKitCore                      0x1e2700 +[UIColor colorNamed:inBundle:compatibleWithTraitCollection:] + 116
9  UIKitCore                      0x34b5b0 -[UIColor initWithCoder:] + 412
10 UIFoundation                   0x1389c UINibDecoderDecodeObjectForValue + 684
11 UIFoundation                   0x134f0 -[UINibDecoder decodeObjectForKey:] + 308
12 UIKitCore                      0x3849e0 -[UIView initWithCoder:] + 716
13 UIKitCore                      0x17a454 -[UIImageView initWithCoder:] + 92
14 UIFoundation                   0x1389c UINibDecoderDecodeObjectForValue + 684
15 UIFoundation                   0x13a28 UINibDecoderDecodeObjectForValue + 1080
16 UIFoundation                   0x134f0 -[UINibDecoder decodeObjectForKey:] + 308
17 UIKitCore                      0x384a34 -[UIView initWithCoder:] + 800
18 UIKitCore                      0x12dff98 -[UITableViewCellContentView initWithCoder:] + 48
19 UIFoundation                   0x1389c UINibDecoderDecodeObjectForValue + 684
20 UIFoundation                   0x13a28 UINibDecoderDecodeObjectForValue + 1080
21 UIFoundation                   0x134f0 -[UINibDecoder decodeObjectForKey:] + 308
22 UIKitCore                      0x384a34 -[UIView initWithCoder:] + 800
23 UIKitCore                      0x12d74f8 -[UITableViewCell initWithCoder:] + 96
24 HOLIDAY_PIRATES                0x16bac0 Paragraph_Cell.init(coder:) + 34 (Paragraph_Cell.swift:34)
25 HOLIDAY_PIRATES                0x16bb04 @objc Paragraph_Cell.init(coder:) + 4338350852 (<compiler-generated>:4338350852)
26 UIKitCore                      0x38760c -[UIClassSwapper initWithCoder:] + 1544
27 UIFoundation                   0x1389c UINibDecoderDecodeObjectForValue + 684
28 UIFoundation                   0x134f0 -[UINibDecoder decodeObjectForKey:] + 308
29 UIKitCore                      0x384134 -[UIRuntimeConnection initWithCoder:] + 92
30 UIFoundation                   0x1389c UINibDecoderDecodeObjectForValue + 684
31 UIFoundation                   0x13a28 UINibDecoderDecodeObjectForValue + 1080
32 UIFoundation                   0x134f0 -[UINibDecoder decodeObjectForKey:] + 308
33 UIKitCore                      0x3877b8 -[NSCoder(UIIBDependencyInjectionInternal) _decodeObjectsWithSourceSegueTemplate:creator:sender:forKey:] + 292
34 UIKitCore                      0x468610 -[UINib instantiateWithOwner:options:] + 768
35 UIKitCore                      0x2387e8 -[UITableView _dequeueReusableViewOfType:withIdentifier:] + 488
36 UIKitCore                      0x389d44 -[UITableView dequeueReusableCellWithIdentifier:] + 156
37 UIKitCore                      0x3899b8 -[UITableView _dequeueReusableCellWithIdentifier:forIndexPath:usingPresentationValues:] + 220
38 UIKitCore                      0x3897d4 -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] + 72
39 HOLIDAY_PIRATES                0x2984a8 Element.makeCell(tableView:indexPath:controller:adapterColor:) + 59 (ElementExtension.swift:59)
40 HOLIDAY_PIRATES                0x2d6824 @objc PostDetailsViewController.tableView(_:cellForRowAt:) + 618 (PostDetailsViewController.swift:618)
41 UIKitCore                      0x2373f4 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 1352
42 UIKitCore                      0x23621c -[UITableView _updateVisibleCellsForRanges:createIfNecessary:] + 584
43 UIKitCore                      0x2357dc -[UITableView _updateVisibleCellsNow:] + 1096
44 UIKitCore                      0x306458 -[UITableView layoutSubviews] + 148
45 UIKitCore                      0xda2c -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2424
46 QuartzCore                     0x78c28 CA::Layer::layout_if_needed(CA::Transaction*) + 496
47 UIKitCore                      0x508c8 -[UIView(Hierarchy) layoutBelowIfNeeded] + 312
48 HOLIDAY_PIRATES                0x2d1784 closure #3 in PostDetailsViewController.bind(to:) + 282 (PostDetailsViewController.swift:282)
49 Combine                        0xacec Subscribers.Sink.receive(_:) + 92
50 Combine                        0xac80 protocol witness for Subscriber.receive(_:) in conformance Subscribers.Sink<A, B> + 24
51 Combine                        0xa960 closure #1 in Publishers.ReceiveOn.Inner.receive(_:) + 288
52 libswiftDispatch.dylib         0x24f4 thunk for @escaping @callee_guaranteed () -> () + 36
53 libdispatch.dylib              0x2370 _dispatch_call_block_and_release + 32
54 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
55 libdispatch.dylib              0x129e0 _dispatch_main_queue_drain + 980
56 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF + 44
57 CoreFoundation                 0x56204 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
58 CoreFoundation                 0x53440 __CFRunLoopRun + 1996
59 CoreFoundation                 0x52830 CFRunLoopRunSpecific + 588
60 GraphicsServices               0x11c4 GSEventRunModal + 164
61 UIKitCore                      0x3d407c -[UIApplication _run] + 816
62 UIKitCore                      0x4828a0 UIApplicationMain + 340
63 HOLIDAY_PIRATES                0x4a0240 main + 27 (AppDelegate.swift:27)
64 ???                            0x1ae8daec8 (Missing)

Thread
0  libsystem_pthread.dylib        0x1480 start_wqthread + 8879211646

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_pthread.dylib        0x1480 start_wqthread + 8879211646

trust
0  libsystem_kernel.dylib         0x1688 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4d98 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4cb0 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4afc mach_msg + 24
4  libdispatch.dylib              0x1ef14 _dispatch_mach_send_and_wait_for_reply + 544
5  libdispatch.dylib              0x1f2b4 dispatch_mach_send_with_result_and_wait_for_reply + 60
6  libxpc.dylib                   0x10930 xpc_connection_send_message_with_reply_sync + 256
7  Security                       0x209e4 security_fw_send_message_with_reply_sync_inner + 92
8  Security                       0x20360 securityd_send_sync_and_do + 88
9  Security                       0x22d60 __SecTrustEvaluateIfNecessary_block_invoke_3 + 504
10 Security                       0x1e294 SecOSStatusWith + 56
11 Security                       0x32b30 __SecTrustEvaluateIfNecessary_block_invoke_2 + 116
12 libsystem_trace.dylib          0x2354 _os_activity_initiate_impl + 64
13 Security                       0x33108 __SecTrustEvaluateIfNecessary_block_invoke + 296
14 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
15 libdispatch.dylib              0x13750 _dispatch_lane_barrier_sync_invoke_and_complete + 56
16 Security                       0x11780 SecTrustEvaluateIfNecessary + 236
17 Security                       0x2d4ec SecTrustCopyCertificateChain + 60
18 CFNetwork                      0x95170 HTTPProtocol::updateForHeader(__CFHTTPMessage*) + 1604
19 CFNetwork                      0x946dc HTTPProtocol::performHeaderReadPostProcessing(__CFHTTPMessage*, unsigned char) + 84
20 CFNetwork                      0x931e8 HTTPProtocol::performHeaderRead(__CFHTTPMessage*) + 2608
21 CFNetwork                      0x1a188 HTTPProtocol::handleStreamEvent(__CFHTTPMessage*, NSObject<OS_dispatch_data>*, CFStreamError const*) + 584
22 CFNetwork                      0x8a234 HTTP3Stream::_protocolCallback() + 104
23 CFNetwork                      0x89b2c invocation function for block in HTTP3Stream::_read(bool) + 1864
24 CFNetwork                      0x893d8 invocation function for block in HTTP3Framer::read(void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 60
25 CFNetwork                      0x892dc HTTP3Framer::_readHeader(NSObject<OS_dispatch_data>*, void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 720
26 CFNetwork                      0x88e78 HTTP3Framer::_read(void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 80
27 CFNetwork                      0x88ccc HTTP3Stream::_read(bool) + 392
28 CFNetwork                      0x89bec invocation function for block in HTTP3Stream::_read(bool) + 2056
29 CFNetwork                      0x893d8 invocation function for block in HTTP3Framer::read(void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 60
30 CFNetwork                      0x892dc HTTP3Framer::_readHeader(NSObject<OS_dispatch_data>*, void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 720
31 CFNetwork                      0x6fbc0 invocation function for block in HTTP3Framer::_readHeader(NSObject<OS_dispatch_data>*, void (H3::FrameMetadata, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 176
32 CFNetwork                      0x17170 invocation function for block in NWIOConnection::readWithContext(NSObject<OS_nw_content_context>*, unsigned int, unsigned int, void (NSObject<OS_nw_content_context>*, NSObject<OS_dispatch_data>*, bool, CFStreamError) block_pointer) + 580
33 libdispatch.dylib              0x132e8 _dispatch_block_async_invoke2 + 148
34 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
35 libdispatch.dylib              0xb6d8 _dispatch_lane_serial_drain + 744
36 libdispatch.dylib              0xc214 _dispatch_lane_invoke + 432
37 libdispatch.dylib              0xd670 _dispatch_workloop_invoke + 1732
38 libdispatch.dylib              0x17258 _dispatch_root_queue_drain_deferred_wlh + 288
39 libdispatch.dylib              0x16aa4 _dispatch_workloop_worker_thread + 540
40 libsystem_pthread.dylib        0x4c7c _pthread_wqthread + 288
41 libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1688 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4d98 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4cb0 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4afc mach_msg + 24
4  CoreFoundation                 0x53a84 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x53130 __CFRunLoopRun + 1212
6  CoreFoundation                 0x52830 CFRunLoopRunSpecific + 588
7  Foundation                     0xb7500 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8  Foundation                     0xb7350 -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9  UIKitCore                      0x3e7524 -[UIEventFetcher threadMain] + 420
10 Foundation                     0xc86c8 __NSThread__start__ + 724
11 libsystem_pthread.dylib        0x637c _pthread_start + 136
12 libsystem_pthread.dylib        0x1494 thread_start + 8

Crashed: io.adjust.PackageQueue
0  libsystem_platform.dylib       0x34e4 _platform_strstr + 52
1  AdjustSigSdk                   0x1e718 (Missing UUID a01d367b99423f55ba4b247f6472ff50)
2  AdjustSigSdk                   0x84f0 (Missing UUID a01d367b99423f55ba4b247f6472ff50)
3  AdjustSigSdk                   0x173f4 (Missing UUID a01d367b99423f55ba4b247f6472ff50)
4  CoreFoundation                 0x20374 __invoking___ + 148
5  CoreFoundation                 0x1f3c4 -[NSInvocation invoke] + 428
6  AdjustSdk                      0x295f0 -[ADJRequestHandler signWithSigPluginWithMergedParameters:activityKind:clientSdk:urlHostString:] + 593 (ADJRequestHandler.m:593)
7  AdjustSdk                      0x27934 -[ADJRequestHandler sendPackageByPOST:sendingParameters:] + 89 (ADJRequestHandler.m:89)
8  AdjustSdk                      0x2538c -[ADJPackageHandler sendFirstI:] + 303 (ADJPackageHandler.m:303)
9  AdjustSdk                      0x255f0 -[ADJPackageHandler sendNextI:previousResponseContinueIn:] + 347 (ADJPackageHandler.m:347)
10 AdjustSdk                      0x24780 __37-[ADJPackageHandler sendNextPackage:]_block_invoke + 113 (ADJPackageHandler.m:113)
11 AdjustSdk                      0x36bd4 __42+[ADJUtil launchInQueue:selfInject:block:]_block_invoke + 828 (ADJUtil.m:828)
12 libdispatch.dylib              0x2370 _dispatch_call_block_and_release + 32
13 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
14 libdispatch.dylib              0xb6d8 _dispatch_lane_serial_drain + 744
15 libdispatch.dylib              0xc1e0 _dispatch_lane_invoke + 380
16 libdispatch.dylib              0x17258 _dispatch_root_queue_drain_deferred_wlh + 288
17 libdispatch.dylib              0x16aa4 _dispatch_workloop_worker_thread + 540
18 libsystem_pthread.dylib        0x4c7c _pthread_wqthread + 288
19 libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

com.google.firebase.crashlytics.MachExceptionServer
0  libsystem_kernel.dylib         0x1688 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4d98 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4cb0 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4afc mach_msg + 24
4  FirebaseCrashlytics            0x174f8 FIRCLSMachExceptionServer + 192 (FIRCLSMachException.c:192)
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x1410 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

KSCrash Exception Handler (Secondary)
0  libsystem_kernel.dylib         0x1688 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4d98 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4cb0 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4afc mach_msg + 24
4  Bugsnag                        0x7a60 ksmachexc_i_handleExceptions + 229 (BSG_KSCrashSentry_MachException.c:229)
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

com.bugsnag.app-hang-detector
0  libsystem_kernel.dylib         0x161c semaphore_timedwait_trap + 8
1  libdispatch.dylib              0x46e8 _dispatch_sema4_timedwait + 64
2  libdispatch.dylib              0x4ce8 _dispatch_semaphore_wait_slow + 76
3  Bugsnag                        0xced8 BSGAppHangDetector::-[BSGAppHangDetector detectAppHangs] + 133 (BSGAppHangDetector.m:133)
4  Bugsnag                        0xce44 DetectAppHangs + 217 (BSGAppHangDetector.m:217)
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1688 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4d98 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4cb0 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4afc mach_msg + 24
4  CoreFoundation                 0x53a84 __CFRunLoopServiceMachPort + 160
5  CoreFoundation                 0x53130 __CFRunLoopRun + 1212
6  CoreFoundation                 0x52830 CFRunLoopRunSpecific + 588
7  CFNetwork                      0xfdee0 +[__CFN_CoreSchedulingSetRunnable _run:] + 416
8  Foundation                     0xc86c8 __NSThread__start__ + 724
9  libsystem_pthread.dylib        0x637c _pthread_start + 136
10 libsystem_pthread.dylib        0x1494 thread_start + 8
@idemiradjust
Copy link

Hi @remziyildirim,

Thanks for letting us know about the issue. I'll check it.

@dimim
Copy link

dimim commented Dec 5, 2024

Hi @remziyildirim.

Thank you for reporting this & your patience.

Jumping in after a sync with @idemiradjust.

Possible cause of the crash has been identified and fixed in version 3.35.1 of the Signature. Kindly update & let us know how it goes. Under SDKV5 & dependency managers, all you need to do is refresh your dependency manager and the latest stable Sig version (3.35.1) will be automatically pulled.

Changes & reasons for the behaviour seen:

  • The piece of code responsible has been running, in production, as stable since Feb. 2024 with no issues reported
  • New tests couldn't reproduce the problem even under iOS 18
  • Hence, likely the issue is due iOS runtime updates/alterations or specific edge cases. The fix introduced, guards against, even redundantly, any edge cases

@remziyildirim
Copy link
Author

Hi @dimim & @idemiradjust,

Thanks a lot for your quick actions, we will prepare a release build which contains 3.35.1 of the Signature SDK. I will definitely let you know how it goes after the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants