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

Intermittent crash in Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) #64

Closed
measuredweighed opened this issue Aug 29, 2023 · 4 comments

Comments

@measuredweighed
Copy link

measuredweighed commented Aug 29, 2023

We're seeing an intermittent crash in our production environment that seems to point to Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) (Adapty 2.6.2)

The call to Adapty.activate on our side is made from application(_:didFinishLaunchingWithOptions:) and looks like this:

Adapty.activate("public_live_XXX", observerMode: true)

Attached are two of the latest stacktraces we've received:

CrashReporter Key:  e5f302d9fab07157daf55a18f344fc7ebea95dc4
Hardware Model:     iPhone14,2
Process:            X
Identifier:         X
Version:            14.13.0
Role:               Foreground
OS Version:         iOS 16.6


SIGABRT: 

0  libsystem_kernel.dylib +0x7578  ___pthread_kill
1  libsystem_pthread.dylib +0x7114 _pthread_kill
2  libsystem_c.dylib +0x1d174      _abort
3  libswiftCore.dylib +0x3b8b94    swift::fatalErrorv(unsigned int, char const*, char*)
4  libswiftCore.dylib +0x3b8bb4    swift::fatalError(unsigned int, char const*, ...)
5  libswiftCore.dylib +0x3bd7c4    _swift_deallocClassInstance
6  libswiftCore.dylib +0x3bd614    __swift_release_dealloc
7  libswiftCore.dylib +0x3be438    bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int)
8  X +0x51c0b0          closure #1 in static Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) (<compiler-generated>)
9  X +0x52674c          partial apply for closure #1 in static Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) (<compiler-generated>)
10 X +0x4f96a8          closure #1 in static Adapty.async(_:group:qos:flags:logName:logParams:function:execute:) (Adapty+AsyncHelpers.swift:31:13)
11 X +0x526b3c          partial apply for closure #1 in static Adapty.async(_:group:qos:flags:logName:logParams:function:execute:) (<compiler-generated>)
12 X +0x516418          thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
13 libdispatch.dylib +0x231c       __dispatch_call_block_and_release
14 libdispatch.dylib +0x3ea8       __dispatch_client_callout
15 libdispatch.dylib +0xb530       __dispatch_lane_serial_drain
16 libdispatch.dylib +0xc0a0       __dispatch_lane_invoke
17 libdispatch.dylib +0x16cd8      __dispatch_workloop_worker_thread
18 libsystem_pthread.dylib +0xdd8  __pthread_wqthread
CrashReporter Key:  af3c552ff8ecf820a11da09d20a826d54d0ac264
Hardware Model:     iPhone13,3
Process:            X
Identifier:         X
Version:            14.13.0
Role:               Foreground
OS Version:         iOS 16.5.1


SIGABRT: 

0  libsystem_kernel.dylib +0x7558  ___pthread_kill
1  libsystem_pthread.dylib +0x7114 _pthread_kill
2  libsystem_c.dylib +0x1d174      _abort
3  libswiftCore.dylib +0x3b8ba4    swift::fatalErrorv(unsigned int, char const*, char*)
4  libswiftCore.dylib +0x3b8bc4    swift::fatalError(unsigned int, char const*, ...)
5  libswiftCore.dylib +0x3bd7d4    _swift_deallocClassInstance
6  libswiftCore.dylib +0x3bd624    __swift_release_dealloc
7  libswiftCore.dylib +0x3be448    bool swift::RefCounts<swift::RefCountBitsT<(swift::RefCountInlinedness)1> >::doDecrementSlow<(swift::PerformDeinit)1>(swift::RefCountBitsT<(swift::RefCountInlinedness)1>, unsigned int)
8  X +0x51c0b0          closure #1 in static Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) (<compiler-generated>)
9  X +0x52674c          partial apply for closure #1 in static Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:) (<compiler-generated>)
10 X +0x4f96a8          closure #1 in static Adapty.async(_:group:qos:flags:logName:logParams:function:execute:) (Adapty+AsyncHelpers.swift:31:13)
11 X +0x526b3c          partial apply for closure #1 in static Adapty.async(_:group:qos:flags:logName:logParams:function:execute:) (<compiler-generated>)
12 X +0x516418          thunk for @escaping @callee_guaranteed () -> () (<compiler-generated>)
13 libdispatch.dylib +0x231c       __dispatch_call_block_and_release
14 libdispatch.dylib +0x3ea8       __dispatch_client_callout
15 libdispatch.dylib +0xb530       __dispatch_lane_serial_drain
16 libdispatch.dylib +0xc0a0       __dispatch_lane_invoke
17 libdispatch.dylib +0x16cd8      __dispatch_workloop_worker_thread
18 libsystem_pthread.dylib +0xdd8  __pthread_wqthread
@x401om
Copy link
Contributor

x401om commented Aug 29, 2023

Hey, @measuredweighed! Are you using async-await syntax or maybe passing a completion handler to the activate method? Also here I can see only stacktrace but not exception you are getting, can you please provide the error text?

@measuredweighed
Copy link
Author

The exception as reported by Bugsnag is SIGABRT closure #1 in static Adapty.activate(_:observerMode:customerUserId:enableUsageLogs:storeKit2Usage:dispatchQueue:_:).

We're not passing a completion handler to the activate method or using an async await syntax. The call provided in the original ticket is made towards the top of application(_:didFinishLaunchingWithOptions:)

@x401om
Copy link
Contributor

x401om commented Feb 12, 2024

Hey there,

Sorry for the delay in getting back to you.

We've tried to recreate the issue, but no luck so far. Are you still facing the problem? Also, have you updated to the latest SDK version?

Any extra details would be super helpful. If we can't gather more info, we might have to close the issue.

Thanks for your patience!

@x401om
Copy link
Contributor

x401om commented Feb 29, 2024

Closing this issue due to inactivity and lack of sufficient info for investigation. If you're facing this issue and have more details, feel free to reopen. Thanks!

@x401om x401om closed this as completed Feb 29, 2024
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

2 participants