client-sdk-android
client-sdk-android copied to clipboard
BufferOverflowException crash when rendering a videotrack on some devices
Describe the bug Hello, there's a persistent crash we see via Crashlytics affecting only a handful of older devices. It's been happening since we started using the library a few years ago, since the version 1.2.0 up until the latest version. Basically the crash randomly happens when rendering a videotrack. Here's the stack trace:
Fatal Exception: java.nio.BufferOverflowException:
at java.nio.ByteBuffer.put(ByteBuffer.java:615)
at livekit.org.webrtc.AndroidVideoDecoder.copyI420Buffer(AndroidVideoDecoder.java:539)
at livekit.org.webrtc.AndroidVideoDecoder.deliverByteFrame(AndroidVideoDecoder.java:477)
at livekit.org.webrtc.AndroidVideoDecoder.deliverDecodedFrame(AndroidVideoDecoder.java:393)
at livekit.org.webrtc.AndroidVideoDecoder$1.run(AndroidVideoDecoder.java:353)
We use the most basic functionality of the library, similar to sample-app-basic, and we use TextureViewRenderer for rendering.
To Reproduce I think running any sample project on any of the devices from the list below would reproduce the crash.
Device Info: Galaxy Tab S4 Galaxy Tab S3 Galaxy Tab A Lenovo Tab M10 (FHD) Lenovo Tab M10 (HD)