Symptom
iOS app crashes sometimes when the there is a close out of a screen that holds a strong reference to OTSubscribers.
Applies To
- iOS
Resolution
To resolve this issue deinit
block with below code ( in ChatViewController.swift):
deinit {
print("deinit")
publisher.delegate = nil;
for sub in subscribers {
sub.delegate = nil
}
session.delegate = nil;
}
This sub streams delegates deallocation by assigning nil value and now crash should not appear.
Cause
It seems it may be trying to render a frame for a subscriber that's being deallocated.
Additional Information
iOS 15, iOS 16, iOS 17 were tested and crash appeared
Articles in this section
- OpenTok iOS SDK crash: -[OTSubscriber renderer:didReceiveFrame:]_block_invoke
- Updating iOS SDK to latest version
- Managing Audio Sessions in iOS with Vonage Video API
- What are the supported Video Dimensions, Aspect Ratios, and Rendering on Mobile SDKs?
- Handling Reconnection and Network Migration on Mobile Devices
- Where can I see the sample code for Vonage Video iOS SDK?
- What devices does Vonage Video iOS SDK support?
- iOS 14 Requesting Permission in Relayed Sessions
- Streaming Video has Letterbox Effect