Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[help] iOS build successful, but as soon as it access to dissonance, it crashes #241

Open
simonglad opened this issue Oct 22, 2021 · 7 comments

Comments

@simonglad
Copy link

simonglad commented Oct 22, 2021

Context

I am having issue while using WebRTC and dissonance in iOS.
I am enjoying using Dissonance asset, and it works just fine with android and editor.
When I build for iOS, there is no issue. However, as soon as the dissonance connects to the peer, it crashes.
I know it's hard to tell which step I am missing, but would you please verify the error I am facing?

Expected Behavior

Supposed to connect with peer with no problem

Actual Behavior

As soon as it connects to the peer, the app crashes and RTC Signalling error appears.
The screen shot of Xcode is as follows:
MicrosoftTeams-image (41)

Your Environment

Dissonance Voice Chat 8.0.2
Dissonance For WebRTC Network 8.0.0
Unity 2019.4.17f1
Xcode 13
WebRTC Video Chat 0.9852.0

@martindevans
Copy link
Member

martindevans commented Oct 22, 2021

Can you check if you can establish a session using just the WebRTC Video Chat asset without Dissonance? If that crashes; please try removing Dissonance from the project and then try it again (make sure to close the editor, delete Assets/Plugins/Dissonance and then open the editor).

@simonglad
Copy link
Author

simonglad commented Oct 22, 2021

Without dissonance, I have built with only WebRTC Video chat asset on a new project, and it works fine.
However, if it combines with dissonance and dissonance for WebRTC, it shows the same symptom.
It builds fine, but as soon as it connects to the peer, it crashes with same error.
Any suggestions?

@martindevans
Copy link
Member

I think what's going on here is that the WebRTC Video Chat asset provides part of WebRTC in a native plugin and Dissonance also has some of WebRTC in the AudioPluginDissonance plugin (used for audio preprocessing). On other platforms this is fine, they're two separate DLLs and there's no confusion. However, on iOS everything is statically linked together so those duplicate symbols clash. One of the two assets will end up calling the method from the other asset and that can cause all kinds of chaos!

Unfortunately I don't know of any easy way to workaround this, it's a fundamental issue with trying to load two different versions of the same library on iOS. I'm going to have to mark the WebRTC for Dissonance package as not compatible with iOS, sorry.

You might be able to use something like this to rename all ofthe symbols in libAudioPluginDissonance.a and then change the C# code in Assets/Plugins/Dissonance/Core/Audio/Capture/AudioPluginDissonanceNative.cs. But I don't fully understand this process at the moment so I wouldn't really be able to support you and can't guarantee that it would work :(

@simonglad
Copy link
Author

Do you have any plan to update for iOS users?
Or we need to find another solution since we can not hold on to this issue forever.
BTW, I really love your asset and I am looking forward to any update sooner or later.
Thank you, in advance.

@martindevans
Copy link
Member

Unfortunately I don't think I can fix this quickly - I'll need to do a lot of research into that potential solution I linked and then a lot of testing on iOS devices to make sure it hasn't broken something in a subtle way. I recommend switching to a different network backend.

@cristiancaride
Copy link

It is happening to me too, do you have any fix already or no?

@martindevans
Copy link
Member

We did put out an update for the iOS binaries a while ago which applies the fix I talked about above (this one).

Unfortunately if that isn't working for you I think we'll have to say that Dissonance is incompatible with WebRTC Video Chat on iOS.

@martindevans martindevans removed their assignment Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants