smartlook / smartlook-mobile-issue-tracker

Official Smartlook issue tracker for mobile SDKs
4 stars 0 forks source link

Crashed: com.smartlook.sdk.VideoWriterQueue (QOS: DEFAULT) #128

Closed Kondamon closed 2 years ago

Kondamon commented 2 years ago

Platform iOS

Technology native

Smartlook SDK version 1.8.3

Summary Crashes appear for multiple users in Google Firebase Crashlytics

Relevant logs and/or screenshots

Crashed: com.smartlook.sdk.VideoWriterQueue (QOS: DEFAULT)
0  Smartlook                      0x9f1ac _hidden#2198_ + 613996 (__hidden#946_:613996)
1  Smartlook                      0xcd8c0 _hidden#2195_ + 804224 (__hidden#946_:804224)
2  Smartlook                      0x19c0c _hidden#2189_ + 67788 (__hidden#1169_:67788)
3  Smartlook                      0x1782c _hidden#1993_ + 158 (__hidden#2031_:158)
4  Smartlook                      0x178ac _hidden#1994_ + 58732 (__hidden#946_:58732)
5  Foundation                     0x4fb18 __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 24
6  Foundation                     0x5dbb0 __NSOQSchedule_f + 184
7  libdispatch.dylib              0x2914 _dispatch_call_block_and_release + 32
8  libdispatch.dylib              0x4660 _dispatch_client_callout + 20
9  libdispatch.dylib              0x7b34 _dispatch_continuation_pop + 504
10 libdispatch.dylib              0x7190 _dispatch_async_redirect_invoke + 596
11 libdispatch.dylib              0x15dd0 _dispatch_root_queue_drain + 396
12 libdispatch.dylib              0x165f8 _dispatch_worker_thread2 + 164
13 libsystem_pthread.dylib        0x10b8 _pthread_wqthread + 228
14 libsystem_pthread.dylib        0xe94 start_wqthread + 8
pavel-kroh-smartlook commented 2 years ago

Hi @Kondamon , thanks for the report. It looks like the issues we are already solving.

Unfortunately, an unsymbolicated crash log (the hidden#1234) gives us only very rough cause of the crashes.

Please check if you could symbolicate the crashlog as described here: Adding Identifiable Symbol Names to a Crash Report - in short, the applications sent to App Store in bitcode are finally compiled by the App Store and the dSYMs for symbolication must be thus downloaded from there.

In any case, we prepare a maintenance release that would very likely address this kind of occasional crashes in a week or so.

Kondamon commented 2 years ago

Hi @pavel-kroh-smartlook Thank you four quick reply. I have downloaded all dsym files from AppStoreConnect and uploaded them to Firebase. If you don‘t do this you don‘t get any crash report.

Could this be related to the ‚hidden’ symbols: https://forums.swift.org/t/incomplete-crash-log-symbolication-for-bitcode-enabled-apps-linked-with-packages-containing-resources/42696

pavel-kroh-smartlook commented 2 years ago

Hi @Kondamon , I see. It seems that Apple messed up the things. We got, from another customer, a crashlog with completely nonsensical symbolication recently. Let's hope we guessed the causes of the issue right, regardless.

jtouzy commented 2 years ago

Hi, Same issue in our apps. Same com.smartlook.sdk.VideoWriterQueue crash, multiple times across our users. We have a similar symbolicate stack trace. The last time we faced that was because of Xcode not generating the symbolication the right way... maybe its back again!

pavel-kroh-smartlook commented 2 years ago

Hi @Kondamon , @jtouzy

new SDK version has been released.

It is a maintenance release that also aims to solve some of the crashed. Given the fact that there are ongoing issues with the crashes symbolication, we cannot guarantee we addressed all the crashes, however, we identified some patterns in them and fixed their causes.

New release version is 1.8.4, and it is available via Swift Package Manager, Cocoapods (pod Smartlook) and for direct download.

jtouzy commented 2 years ago

Still receiving crash with Smartlook 1.8.4. Symbolication still hidden tho.

Screenshot 2022-01-24 at 15 24 33
pavel-kroh-smartlook commented 2 years ago

Hi @jtouzy ,

thank you for the crash log. Although it is not symbolicated, there is a few hints in there that allows us to guess where the error occurs (there is a line 73 in our code that looks like the culprit, and there are other hints in the crashlog that point to it as well).

We solidify the suspicious part of the code (some video buffer manipulation) to prevent the crashes and make it part of the next maintenance release.

As for the symbolication, it is now made complex by the fact that apps could be uploaded in bitcode meaning that the App Store makes the final compilation. It is still possible to symbolicate with a few manual steps though (provided, perhaps, that the the symbols are not stripped during the upload): Adding Identifiable Symbol Names to a Crash Report.

Kondamon commented 2 years ago

@pavel-kroh-smartlook, the missing symbolication issue is related to the fact that you are still using Xcode 12.4 for building the Smartlook framework. Your Bcsymbolmap files state that they are from version Apple clang version 12.0.0 (clang-1200.0.32.29) = Xcode 12.4. There is a bug with this Xcode version and you should upgrade to minimum 12.5 or later to see symbolication again, the issue are not apps uploaded in bitcode. See here.

There are so many crashes in Smartlook now, that I'm going to downgrade now to a recent more stable version and so I can not provide you crashlogs anymore until this issue is resolved and I can safely upgrade again.

pavel-kroh-smartlook commented 2 years ago

@Kondamon - I see. We have used the older Xcode because of some CI's used by our clients usually are not up to date. However, the next release is planned in the state-of-the-arts Xcode again.

Kondamon commented 2 years ago

@pavel-kroh-smartlook, ok I understand.

By the way, Xcode 12 support is dropped in April 2022: Starting April 2022, all iOS and iPadOS apps submitted to the App Store must be built with Xcode 13 and the iOS 15 SDK. https://developer.apple.com/ios/submit/

pavel-kroh-smartlook commented 2 years ago

Hi @Kondamon

New Smartlook release 1.8.5 has been released.

The release is dedicated mainly to bugfixing (it attempts to address all known bugs) and other maintenance.

Please give it a try when suitable.

Thanks for the patience.

PS: It is released with the current Xcode version.