iOS crashes after updating from Photon Voice 2.12 to Photon Voice 2.13

Hi all,

After updating the Photon Voice version in my Unity project my iOS apps consistently crash on this line;
// Initialize the AURemoteIO instance
XThrowIfError(AudioUnitInitialize(cd.rioUnit), "couldn't initialize AURemoteIO instance");

in AudioIn.mm

Screenshot%202020-03-18%20at%2011.07.48.png

Any ideas?

Comments

  • Hi @Platipus,

    Thank you for choosing Photon!

    What Unity version is this?
    What iOS device(s) and respective iOS version(s) did you test this with?

    Did you try changing iOS AudioSession settings (category and options) from the Recorder?

    with more details my colleague @vadim can take a look.

  • Hi @JohnTube en @vadim ,

    Thanks for your reply.

    This is Unity version 2018.4.19 (LTS).
    I tried different iOS devices. Recent iPhones and iPad (Pros). All on iOS 13.3.1.

    Screenshot%202020-03-18%20at%2017.52.59.png

    I hope this information helps in troubleshooting my problem.

    Later today I will try different iOS AudioSession Settings to see if that helps to get closer to the source of the problem.
  • Hi @JohnTube & @vadim ,

    I changed the "VoIP" preset to "Game" preset.
    That also crashes the iOS app. But now in AudioIn.mm setupAudioSession() line 269
    [sessionInstance setCategory:self->sessionCategory mode:self->sessionMode options:self->sessionCategoryOptions error:&error];
    

    Screenshot%202020-03-18%20at%2020.12.39.png

    sessionInstance is nil so the app exits with a Thread 1: EXC_BAD_ACCESS (code=1, address=0x0)


  • vadimvadim ✭✭✭
    Hi @Platipus,

    Did you try to run demos from Voice package imported to a new project?

    Please make sure that "Microphone Usage Description" iOS project property is not empty. You can set it in XCode or or in Unity iOS player properties.
  • Thanks @vadim ,

    I have the "Microphone Usage Description" set. Will try the demos.
    But I think it's important to emphasise that my project worked with Unity Voice 2.12 but started crashing after upgrading to Unity Voice 2.13. ( But I'd like to stay with 2.13 for the fixes int contains. )
  • Any updates on this? I'm having the same problem. Crashing on iOS 13.3.1 with latest Photon Voice.
  • Hi @Grant ,

    No, the issue still persists. Also with the now new Photon Voice 2.14. It's too bad, I really tried but I have not been able to solve it or find a workaround. Please let me know here if you happen to solve it for your project.
  • Ah ok, rats. Will let you know if I find anything....
  • Hi @Platipus,

    You could import Photon Voice 2.12's iOS's AudioIn.mm and see if it causes the crash.
    if not you could keep it.
  • Thanks @JohnTube ,

    I'm very happy to tell you that I just tried it and... It works !!!
    Just did a couple of tests. Works perfect. Thanks!
  • JohnTubeJohnTube mod
    edited April 3
    Hey @Platipus,

    My colleague @vadim made a tremendous work investigating, fixing and optimizing this.
    It turns out that we made a change between 2.12 & 2.13 (missing in the change log, sorry) to move some logic in the AudioIn.mm plugin to a worker thread. This is what caused the crash...threading!

    So in order to not lose the performance gain which may result in slightly better audio quality using Photon MicrophoneType on iOS, I invite you to try out this new version with the optimized fix.
  • Thank you @JohnTube and @vadim !
    We are very grateful for the effort you've put in to solving this. It's awesome that you identified the issue and helped us work around it by reverting back to AudioIn.mm from v2.12. That works for us, but I will (later) build and test the fixed (worker thread optimised) AudioIn.mm with the slightly better performance / audio quality too.

  • JohnTubeJohnTube mod
    edited April 6
    Hey @Platipus,

    If you could do the test today to confirm that the new plugin version works (as @Numa did) it would help as I want to release a new version asap.

    Thanks a lot for your all your efforts and help.
  • Hi @JohnTube ,

    I ran some tests with the new plugin version. Works like a charm. Thank you!
Sign In or Register to comment.