Closed zenorbi closed 1 year ago
Thanks for the detailed bug report and reproduction project. @TomGillen is going to try it out on an iOS device to see if we can reproduce it.
@martindevans I have just purchased an asset on the Unity Asset Store. It runs well on Android, but when I tried running it on iPhone 14, it also crashes. Same above problem. I feel very disappointed. Please quickly fix this bug, as I am currently unable to use this asset. 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏 🙏
Tom tried but couldn't reproduce the problem (using an iPad), we're going to be trying to reproduce it again tomorrow (using an iPhone this time).
@the9an could you tell me some more details about your setup, to improve our chances of reproducing the issue?
@martindevans
Thanks for the extra details. That will help a lot tomorrow.
One thing that I noticed is that you have Photon Voice installed. In the past we have had issues on iOS caused by Dissonance and Photon Voice interfering with each other. So it might fix your issue if you uninstall Photon Voice.
@martindevans After I uninstalled Photon Voice, there were no more crashes on iOS. Thank you for the support.
@zenorbi Just checking this isn't the same issue for you? As far as I can see you don't have Photon Voice installed in your project, so there's probably still an issue to be resolved.
@martindevans My issue is different from that, the example I have attached has no libraries besides the Unity base and Dissonance 9.0.2. I have just checked the project on an iPad Pro (11-inch) (4th generation) with iOS 16.6 installed. The iPad is freshly installed, not jailbroken and I just installed the repro project. As soon as I clicked Ok on the Microphone permission popup, the app crashed at the exact same place (ec_tell_frac, EXC_BAD_ACCESS) with the exact same call stack. If I then close the app (and detach the debugger), open it again from the iPad interface, once Unity loads the app crashes immediately.
We also tested this on an iPhone Pro (14th gen) with iOS 17.0 beta (21A5312c). Same exact behavior as with the iPad.
Let me know if I can help you in any way to reproduce the issue. I can also send you the complete unity folder with the generated xcode project as well, but that would include dissonance which you probably don't want to make public :D
We weren't able to reproduce the issue today, but we think we may have an idea what the problem is. Assuming this is the problem we've rebuilt the libopus file with a potential fix. To keep the download link private I've created an issue in your private reproduction repo with the link.
I have tested both the repro project and our big project with the new libopus.a and I can happily report that this fixed the crashing. I am impressed how you managed to fix this without being able to reproduce it. Thank you for the support! Will this be published as a new version in the Unity Asset Store or should I mark this library version as custom made for us?
That's good to hear, thanks for all the detailed. We'll be publishing this in the next version of Dissonance, so you don't need to maintain a fork with this file :)
@martindevans
In the past we have had issues on iOS caused by Dissonance and Photon Voice interfering with each other
For certain specific purposes, I want to retain Photon Voice 2 in my project, is there any way to prevent it from crashing?
Unfortunately for now I don't think it's possible on iOS, the static linking makes things difficult. We might be able to apply the same fix to the preprocessor as we did for the encoder, but it's a lot more complex.
@the9an We've compiled a version of the preprocessor which might fix the problem with Dissonance and PUN2 on iOS. Could you please email me (martin@placeholder-software.co.uk) and I'll send you back a version for testing.
Hi @martindevans, I have the same error but I use mirror network instead PUN2. The crash happens when I unmute mic.
Information: Unity: 2021.3.1f1 Dissonance: 8.3.1 Dissonance for Mirror Networking: 8.3.0 iOS: 16.6
@Ago251 The fixes for the9an were included in the 9.0.3 release of Dissonance. does upgrading to that fix the issue for you?
The error with 9.0.3 version is fixed. Thank you!
Hello, not sure if it's related but libopus crashes on iOS if you build an app with xcode 15+
I've had the exact same crash message EXC_BAD_ACCESS (code=2, address=0x130000001b)
with callstack leading to opus_encode_native
For some reason the app does not crash if built on xcode 14.3.1
Haven't tried upgrading Dissonance to the latest version because literally piled up with tasks right now :(
Info: Unity 2021.3.16f1 | 2021.3.21f1 xcode 15.0.1 Dissonance 9.0.2 macOS Sonoma 14.1.2
The upgrade from 9.0.2 to 9.0.3 should be completely painless. I'd suggest trying that first since it is known to fix a pretty similar error.
If it doesn't work please open up a new issue with as much detail as possible and I'll have to investigate it after Christmas :)
Finally was able to scrap some time to test libopus crash on the latest dissonance update and i can confirm that it works on xcode 15+ 👍
Context
I have a working project that runs on Windows, Linux, macOS both with Mono and IL2CPP. However when I target iOS Dissonance crashes even on a minimal (basically empty) project.
Expected behaviour
The iOS build doesn't crash.
Actual behaviour
The iOS build crashes as soon as Dissonance wants to encode the audio with opus.
Steps to Reproduce
Your Environment
Dissonance version used: 8.2.1 and 9.0.2
Unity version: 2022.3.6f1
Editor Operating System and version: macOS Venture 13.4, iOS 15 and iOS 16
Build Settings: iOS development and non development build as well
Link to your project: dissonance-test.zip
Technical info