urbanairship / ios-library

Urban Airship iOS SDK
http://urbanairship.com
Apache License 2.0
478 stars 265 forks source link

Crash on iPhone X (iOS 16.0) and Airship version 17.2.1 -> 17.3.1 #378

Closed vivianechan closed 11 months ago

vivianechan commented 11 months ago

Preliminary Info

What Airship dependencies are you using?

17.2.1 -> 17.3.1 (installed with Cocoapods)

What are the versions of any relevant development tools you are using?

Xcode 14.3.1

Report

What unexpected behavior are you seeing?

App is crashing on iPhone X (iOS 16.0) at launch time. Crash is happening every single time. The crash does not happen with Airship SDK 17.1.2 It is only crashing on one of our testers phone, we cannot reproduce the crash on any other devices.

What is the expected behavior?

App not crashing

What are the steps to reproduce the unexpected behavior?

Launch app on an iPhone X (iOS 16.0)

Do you have logging for the issue?

See screenshots

Screenshot 2023-10-04 at 9 07 35 PM Screenshot 2023-10-04 at 9 07 54 PM
rlepinski commented 11 months ago

Do you have a stack trace or a crash log? There is not enough info without that

vivianechan commented 11 months ago
Thread 19 Crashed:
0   libswiftCore.dylib              0x00000001c0ebd7c4 swift_task_exitThreadLocalContext + 48 (ConcurrencyExclusivity.inc:0)
1   libswiftCore.dylib              0x00000001c0ebd7a8 swift_task_exitThreadLocalContext + 20 (ConcurrencyExclusivity.inc:345)
2   *****                           0x00000001001aa08c swift::AsyncTask::waitFuture(swift::AsyncTask*, swift::AsyncContext*, void (swift::AsyncContext* swift_async_context) swiftasynccall*, swift::AsyncContext*, swift::OpaqueValue*) + 312
3   *****                           0x00000001001aa1f0 swift::swift56override_swift_task_future_wait(swift::OpaqueValue*, swift::AsyncContext*, swift::AsyncTask*, void (swift::AsyncContext* swift_async_context) swiftasynccall*, swift::AsyncContext*, vo... + 84
4   AirshipKit                      0x0000000101c1c849 closure #2 in AirshipContact.init(dataStore:config:channel:privacyManager:subscriptionListAPIClient:date:notificationCenter:audienceOverridesProvider:contactManager:serialQueue:) + 1 (AirshipContact.swift:179)
5   AirshipKit                      0x0000000101c39135 partial apply for closure #2 in AirshipContact.init(dataStore:config:channel:privacyManager:subscriptionListAPIClient:date:notificationCenter:audienceOverridesProvider:contactManager:serialQueue:) + 1
6   AirshipKit                      0x0000000101c27529 thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1
7   AirshipKit                      0x0000000101c27531 partial apply for thunk for @escaping @callee_guaranteed @Sendable @async () -> () + 1
8   AirshipKit                      0x0000000101c824fd closure #1 in AsyncSerialQueue.init(priority:) + 1 (AsyncSerialQueue.swift:14)
9   AirshipKit                      0x0000000101c8298d partial apply for closure #1 in AsyncSerialQueue.init(priority:) + 1
10  AirshipKit                      0x0000000101c24529 specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1 (<compiler-generated>:0)
11  AirshipKit                      0x0000000101c122e5 partial apply for specialized thunk for @escaping @callee_guaranteed @Sendable @async () -> (@out A) + 1
12  libswift_Concurrency.dylib      0x000000023ed6b1e9 completeTaskWithClosure(swift::AsyncContext*, swift::SwiftError*) + 1 (Task.cpp:458)
rlepinski commented 11 months ago

Do you have the crash reason? The full crash report would be ideal. You should be able to access it if you connect it to a computer and look in the console for crash reports

vivianechan commented 11 months ago

2023-09-2611-07-22.1924-0400-01d36b6f9d4628fadd117092ae488c5a8d87ffde.txt

rlepinski commented 11 months ago

Looks like that device is running a beta version of iOS 16, could you update it to at least the final version of iOS 16. It might just be a beta bug

vivianechan commented 11 months ago

Good catch, let us try to update to the official iOS 16 and see if this fixes the bug. Thanks for the help 👍

vivianechan commented 11 months ago

We can close this bug, we have confirmed that the crash was related to the beta version of iOS 16.0. The official version doesn't crash. Thank you