pendo-io/pendo-mobile-sdk

๐Ÿ’ฅ Crash on `DumpNode.deinit`

Closed this issue ยท 9 comments

Platform + Version

iOS 17.4.1, iOS 15.8.2, ...

SDK Version

3.1.5

Framework

Native SwiftUI

Describe the bug

Crash. As there aren't any notes on crash fixes on 3.2.0, we also suppose these will be present in the version 3.2.0.

To Reproduce

Exact steps unknown, but this occurred during SSO interaction (partly using WebKit) within the app.

Expected behavior

No crash

Logs

Not applicable. Added stack trace below.

Stack Trace

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x000075e8804db680

Crashed: com.apple.main-thread
0  libswiftCore.dylib             0x3ab354 _swift_release_dealloc + 32
1  libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
2  SwiftUI                        0x12d5b2c OUTLINED_FUNCTION_3 + 80
3  libswiftCore.dylib             0x3ac950 (anonymous namespace)::destroyGenericBox(swift::HeapObject*) + 152
4  libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
5  libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
6  libswiftCore.dylib             0x3ac950 (anonymous namespace)::destroyGenericBox(swift::HeapObject*) + 152
7  libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
8  libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
9  Pendo                          0x124cdc DumpNode.deinit + 1228
10 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
11 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
12 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
13 libswiftCore.dylib             0x39093c swift_arrayDestroy + 196
14 libswiftCore.dylib             0x9c9f4 _ContiguousArrayStorage.__deallocating_deinit + 96
15 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
16 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
17 Pendo                          0x124d84 DumpNode.deinit + 1396
18 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
19 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
20 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
21 libswiftCore.dylib             0x39093c swift_arrayDestroy + 196
22 libswiftCore.dylib             0x9c9f4 _ContiguousArrayStorage.__deallocating_deinit + 96
23 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
24 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
25 Pendo                          0x124d84 DumpNode.deinit + 1396
26 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
27 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
28 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
29 libswiftCore.dylib             0x39093c swift_arrayDestroy + 196
30 libswiftCore.dylib             0x9c9f4 _ContiguousArrayStorage.__deallocating_deinit + 96
31 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
32 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
33 Pendo                          0x124d84 DumpNode.deinit + 1396
34 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
35 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
36 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
37 libswiftCore.dylib             0x39093c swift_arrayDestroy + 196
38 libswiftCore.dylib             0x9c9f4 _ContiguousArrayStorage.__deallocating_deinit + 96
39 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
40 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
41 Pendo                          0x124d84 DumpNode.deinit + 1396
42 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
43 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
44 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
45 libswiftCore.dylib             0x39093c swift_arrayDestroy + 196
46 libswiftCore.dylib             0x9c9f4 _ContiguousArrayStorage.__deallocating_deinit + 96
47 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
48 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
49 Pendo                          0x124d84 DumpNode.deinit + 1396
50 Pendo                          0x124d9c DumpNode.__deallocating_deinit + 1420
51 libswiftCore.dylib             0x3ab36c _swift_release_dealloc + 56
52 libswiftCore.dylib             0x3ac488 bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int) + 136
53 Pendo                          0x132320 @objc DumpTree.__ivar_destroyer + 5672
54 libobjc.A.dylib                0x475c object_cxxDestructFromClass(objc_object*, objc_class*) + 116
55 libobjc.A.dylib                0x4490 objc_destructInstance + 80
56 libobjc.A.dylib                0x4438 _objc_rootDealloc + 80
57 libobjc.A.dylib                0x1f84 AutoreleasePoolPage::releaseUntil(objc_object**) + 212
58 libobjc.A.dylib                0x1e10 objc_autoreleasePoolPop + 260
59 CoreFoundation                 0x34f50 _CFAutoreleasePoolPop + 32
60 CoreFoundation                 0xad6e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
61 CoreFoundation                 0xad388 __CFRunLoopDoTimer + 1004
62 CoreFoundation                 0x37184 __CFRunLoopDoTimers + 288
63 CoreFoundation                 0x3418c __CFRunLoopRun + 1856
64 CoreFoundation                 0x33968 CFRunLoopRunSpecific + 608
65 GraphicsServices               0x34e0 GSEventRunModal + 164
66 UIKitCore                      0x22aedc -[UIApplication _run] + 888
67 UIKitCore                      0x22a518 UIApplicationMain + 340
68 REDACTED                       0x5890 main + 9 (AppDelegate.swift:9)
69 ???                            0x1baebed84 (Missing)

@msrutek-paylocity
Any chance your app is on appstore and we could try to run it on our end

@MikePendo Hello, yes, the app is available on the AppStore - https://apps.apple.com/en/app/paylocity/id652438572 - however, an account is required. Could you share an email that we could send test credentials with?

@msrutek-paylocity
Any way you can provide us some sample user to try ?

@msrutek-paylocity will that be possible to provide us some sample user so we can reproduce this?
other crashes should be fixed in the future

Hi @0xkuj @MikePendo , just sent an email with credentials you can use to log in into the app.

we improved our scanning mechanism to scan the minimum number of objects possible, and we believe it may resolve your crashing issues.
in addition to that is will be highly recommended to change the integration with an addition flag as below:

let options = PendoOptions()
options.configs = ["enableTextCollectionSwiftUI":false]
PendoManager.shared().setup(prodAppKey,with: options)

this flag is meant to reduce the texts collection via reflection and base text collection on accessibility elements only.

this was done in our latest 3.2.1 HF fix, please try upgrading and let us know with your results.

@MikePendo @0xkuj Thanks, we've updated the library and used the suggested options configuration.

However, it might take a couple of weeks until this gets to the production users.

We'll let you know if this issue still occurs.

@msrutek-paylocity, thanks for the update.
I'm closing the issue for now, please reopen if needed.