MediaEncoder.drain "format changed twice" exception

Happens on Pixel 5, OS 12 and Pixel 5a, OS13

Stack trace:
Fatal Exception: java.lang.RuntimeException: format changed twice
at ai.deepar.ar.MediaEncoder.drain(MediaEncoder.java:330)
at ai.deepar.ar.MediaEncoder.run(MediaEncoder.java:167)
at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce:

  • Open the front facing camera
  • Start recording
  • Pause Recording
  • Un-pause recording

Crashes 100% of the time

Hi, thanks for reporting.

This is reproducible on our quickstart example?

This is not reproducible on the QuickStart Example since the example does not include pause and resume recording. This is the same situation as a few years ago when I reached out to Matej to enhance the Native Mobile examples such that includes the full scope of Mobile functionality which would allow us to easily point to the issues we are experiencing. We are currently blocked from upgrading the SDK because in our experience each new version of the SDK introduces more issues.

Still an issue in the latest version of the SDK…

Do you think you can expand the quickstart with pause/unpause to make sure no other things interfere?

Here is a screencast of the crash https://www.youtube.com/watch?v=OSe4WgFEHKw