Placeholder-Software / Dissonance

Unity Voice Chat Asset
71 stars 5 forks source link

[bug] iOS Crash when i build with plugin Insta360 camera #240

Closed marksTam201 closed 2 years ago

marksTam201 commented 2 years ago

Context

I use Dissonance HLAPI and plugin Insta360 Camera in my project, it work fine on Android but when I build for IOS, It always crash when I try use BasicMicrophoneCapture and SendFrame. If i setting Activation Mode = none --> no crash app, but can not chat voice, it is ultimately impractical.

Your Environment

Include as many relevant details about the environment you experienced the bug in

image image

martindevans commented 2 years ago

Sorry for the slow reply, I was on holiday last week :)

It looks like the problem may be that the Insta360 SDK uses a symbol which has a naming collision with something in Opus.a/AudioPluginDissonance.a, Unfortunately this can happen on iOS because everything is statically linked so everything needs a unique name.

I can't find any source code for the Insta360 SDK, so I can't verify this. You will need to raise an issue on their end too, to see if they recognise what may be colliding. If you paste a link to that bug report here I'll come and provide whatever details I can.

marksTam201 commented 2 years ago

Thank for reply, I created isses at insta360 github but still not answer.

I try debug and see this bug is related to the function OpusNativeMethods.opus_encode_float and the parameters passed in turn have values of

5452955648
4754595872
1920
4807680032
15360

What's wrong with the above parameters? Hope reply soon!

image image

martindevans commented 2 years ago

What's wrong with the above parameters?

As far as I can tell all of those parameters are correct:

Unfortunately I don't think you'll be able to debug the problem like this - the external interfaces which Dissonance interacts with directly are all uniquely named and won't be colliding. It's most likely an internal symbol somewhere in opus or libAudioPluginDissonance which is colliding with something else in webrtc (there are thousands of symbols in total).

I created isses at insta360 github but still not answer.

If those issues are public would you mind linking them here? I can add any relevant information they need if they reply :)

marksTam201 commented 2 years ago

If those issues are public would you mind linking them here? I can add any relevant information they need if they reply :)

Of course! https://github.com/Insta360Develop/CameraSDK-iOS/issues/6

If i send sdk, you can debug it? Sorry because this sdk is private by insta360 and I need to ask my boss.

martindevans commented 2 years ago

I'll wait and see what they say first. Even if I did have a copy of their SDK to debug with I'm not sure how to work around an issue like this on iOS.

marksTam201 commented 2 years ago

Hi, we have to stop using insta360 now to be able to use dissonance on Ipad. I want to ask more, does dissonance use webrtc and is the outgoing voice data encrypted?

martindevans commented 2 years ago

does dissonance use webrtc?

Dissonance does use components of webrtc, but only for audio processing not for networking.

is the outgoing voice data encrypted?

Dissonance itself does not do encryption, that should be done in the network backend. It looks like HLAPI (which is the backend you're using I think?) does have support for encryption plugins (docs), so you may want to look into that

marksTam201 commented 2 years ago

Yes, I use HLAP, Unet and old Unity version 2018.4 for voice chat. I also don't know if Unet encrypted the data?, I need to do more research. Thank you.

martindevans commented 2 years ago

Since it sounds like you're not using the camera any more and they never responded, I'll close this one for now.