I’m experiencing a crash in release mode while continuously click on Play/Pause button but unable to replicate in debug mode.
Only thing i get from crash logs
0 libobjc.A.dylib 0x5d94 object_getClass + 48
1 Foundation 0xaec8 _NSKeyValueObservationInfoGetObservances + 248
2 Foundation 0x3f780 NSKeyValueWillChangeWithPerThreadPendingNotifications + 232
3 AVFCore 0x8ab94 __avplayeritem_fpItemNotificationCallback_block_invoke_19 + 56
4 libdispatch.dylib 0x2320 _dispatch_call_block_and_release + 32
5 libdispatch.dylib 0x3eac _dispatch_client_callout + 20
6 libdispatch.dylib 0x126a4 _dispatch_main_queue_drain + 928
7 libdispatch.dylib 0x122f4 _dispatch_main_queue_callback_4CF + 44
8 CoreFoundation 0x98d18 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
9 CoreFoundation 0x7a650 __CFRunLoopRun + 1992
10 CoreFoundation 0x7f4dc CFRunLoopRunSpecific + 612
11 GraphicsServices 0x135c GSEventRunModal + 164
12 UIKitCore 0x39d37c -[UIApplication _run] + 888
13 UIKitCore 0x39cfe0 UIApplicationMain + 340
14 Gartner Conference Navigator 0x163a0 main + 21 (AppDelegate.swift:21)
15 ??? 0x1b6f80dec (Missing)
Do you have some more information for us? Can you maybe provide which SDK version you are using?
In general, this stack trace does not include anything related to our BitmovinPlayer SDK, so with just the information we have right now, it’s super hard to determine where the crash is coming from.
Hi @davidsteinacher I’m using SDK 3.36.0.
No I don’t have more info this time.
Ok. Can you maybe provide information like:
- do you maybe have the crash reason available as well?
- which UI do you use?
- do you have any event handler for
onPaused and if so, do you call any Player API in those again?
- does this happen only for a specific stream? E.g. only in live streams.
Crash reason is not available we only see sometime it crash on Destroy and some time play/pause.
Storyboard no SwiftUI is used.
We have event handler PlayerListener like onReady, onPlay, onPaused, onTimeChanged, onDurationChanged, onPlayerError, onStallStarted. We didn’t call any Player API but updating MPNowPlayingInfoCenter meta data.
This happen for both Live stream and VOD.
Any update on this issue? This issue has 215 crash events affecting 175 users in last 7 days which is a significant number. Thanks.
Sorry, I haven’t received any notifications on the replies.
However, without additional information, we cannot identify the proper crash reason. From the stack trace you provided, we can not see any reference to our BitmovinPlayer SDK so the crash could be unrelated to our Player.
Are there maybe additional threading information available or any possibility you could provide us clear reproduction steps?
but unable to replicate in debug mode.
Initially, you mentioned that you can not reproduce in debug mode. Does this mean you can reproduce it in a release build of your App?
We assume the issue is with Bitmovin because in most of the cases we see the logs where user is playing and pausing the video.
We are not able to replicate the issue. but we are getting logs on firebase.
Secondly while looking into the issue we found the KVO observer on AVPlayer item needs to be removed. But we are not handling KVO on AVPlayer item. It’s handled through the Bitmovin lib.
We are also using the following code for deinitializing the player. Thanks.
PLAY log from the screenshot the last log received before such a crash?
Ans- Yes, in this case.
Does it happen immediately when hitting play, or could it be that some other user interaction, such as navigating away from the view, also happens before the crash?
Ans- In other cases we have found, it can happen in some other interaction as well like after Pause or navigating away from the view. But the behaviour where user - clicks on “Play, Pause multiple times” remain constant in all cases.
We are making recommended changes in the deinit function.
But we are not handling KVO on AVPlayer item. It’s handled through the Bitmovin lib.
That is correct and we do remove the KVO on the AVPlayerItem when the player is released.
PLAY log from the screenshot the last log received before such a crash? Does it happen immediately when hitting play, or could it be that some other user interaction, such as navigating away from the view, also happens before the crash?
deinit code, I would have a suggestion, but I don’t know if this could cause the crash. It would make more sense to call
analyticsCollector?.detachPlayer() before calling
player?.destroy(). Destroying the Player should be the last interaction on the instance and
.detachPlayer() might potentially still call some APIs (but that should at least result in a proper exception message).