Jump to content
  • 0

UnitySDK makes iOS crash upon connection


Michele Castelletti
 Share

Question

Hello,

so we recently encountered a problem on iOS that occurs while connecting the app to the server for AudioOnly.
The connection type is MultiSendReceive.
The same exact thing works flawlessly on Android.

After looking through the code we found out the crash happens when we try to AddTrack, specifically when calling this function:

static_cast<PInvokeFunc>(sora_set_on_add_track)(___p0, ____on_add_track1_marshaled, ___userdata2);

on row 38231 of file Unity-iPhone/Classes/Native/Assembly-CSharp2.cpp.

The parameters that are sent to that function seems to not be null, so don't really know what to do.

We also tried updating the whole framework from SoraUnitySdk repository, recompiled it for iOS (the libs got a bit larger), but nothing changed at all.

Is there anything else we should try/check in order to solve this issue?

 

 

Thank you in advance

Link to comment
Share on other sites

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

3 answers to this question

Recommended Posts

  • 0

Updates:

after activating development build from Unity I got some extra log in XCode:

[000:017][259] (RTCLogging.mm:33): (RTCAudioSession.mm:113 -[RTCAudioSession initWithAudioSession:]): RTC_OBJC_TYPE(RTCAudioSession) (0x282ffd8c0): init.

[000:017][259] (sora.cpp:102): Sora::Connect unity_version=2020.1.17f1 signaling_url =wss://<my_domain>:5443/WebRTCAppEE/websocket channel_id=<my-id> metadata= role=sendrecv multistream=1 capturer_type=0 unity_camera_texture=0x0 video_capturer_device= video_width=640 video_height=480 unity_audio_input=0 unity_audio_output=0 audio_recording_device= audio_playout_device= audio_enabled=;0

[000:021][44807] (audio_device_impl.cc:76): Create

[000:021][44807] (audio_device_impl.cc:84): CreateForTest

[000:022][44807] (audio_device_buffer.cc:65): AudioDeviceBuffer::ctor

[000:022][44807] (audio_device_impl.cc:122): AudioDeviceModuleImpl

[000:022][44807] (audio_device_impl.cc:126): CheckPlatform

[000:022][44807] (audio_device_impl.cc:140): current platform is IOS

[000:022][44807] (audio_device_impl.cc:156): CreatePlatformSpecificObjects

[000:022][44807] (audio_device_impl.cc:947): PlatformAudioLayer

[000:023][44807] (audio_device_ios.mm:116): AudioDeviceIOS::ctor<NSThread: 0x28023c500>{number = 11, name = (null)}

[000:023][44807] (audio_device_impl.cc:284): iPhone Audio APIs will be utilized.

[000:023][44807] (audio_device_impl.cc:312): AttachAudioBuffer

[000:024][44807] (audio_device_ios.mm:133): AudioDeviceIOS::AttachAudioBuffer

[000:024][259] (mac_capturer.mm:108): video device found: [0] device_name=Back Camera

[000:024][259] (mac_capturer.mm:108): video device found: [1] device_name=Front Camera

[000:024][259] (mac_capturer.mm:143): selected video device: [0] device_name=Back Camera

[000:032][21511] (RTCLogging.mm:33): (RTCCameraVideoCapturer.m:161 -[RTCCameraVideoCapturer startCaptureWithDevice:format:fps:completionHandler:]_block_invoke): startCaptureWithDevice <AVCaptureDeviceFormat: 0x281aec660 'vide'/'420v'  640x 480, { 3- 60 fps}, HRSI:4032x3024, fov:63.173, max zoom:189.00 (upscales @6.30), AF System:2, ISO:22.0-1760.0, SS:0.000020-0.333333> @ 30 fps

[000:034][259] (audio_processing_impl.cc:272): Injected APM submodules:

Echo control factory: 0

Echo detector: 0

Capture analyzer: 0

Capture post processor: 0

Render pre processor: 0

[000:035][259] (webrtc_voice_engine.cc:258): WebRtcVoiceEngine::WebRtcVoiceEngine

[000:035][259] (webrtc_video_engine.cc:590): WebRtcVideoEngine::WebRtcVideoEngine()

[000:037][44807] (webrtc_voice_engine.cc:280): WebRtcVoiceEngine::Init

[000:039][44807] (unity_audio_device.h:86): Init

[000:039][44807] (audio_device_buffer.cc:65): AudioDeviceBuffer::ctor

[000:039][44807] (audio_device_impl.cc:332): Init

[000:039][44807] (audio_device_ios.mm:140): AudioDeviceIOS::Init

[000:039][44807] (audio_device_ios.mm:664): AudioDeviceIOS::UpdateAudioDevicebuffer

[000:039][44807] (audio_device_buffer.cc:187): SetPlayoutSampleRate(48000)

[000:039][44807] (audio_device_buffer.cc:207): SetPlayoutChannels(1)

[000:039][44807] (audio_device_buffer.cc:181): SetRecordingSampleRate(48000)

[000:039][44807] (audio_device_buffer.cc:201): SetRecordingChannels(1)

[000:039][44807] (unity_audio_device.h:135): SetPlayoutDevice(0)

[000:039][44807] (audio_device_impl.cc:676): SetPlayoutDevice(0)

[000:039][44807] (audio_device_ios.mm:1009): SetPlayoutDevice: Not implemented

[000:039][44807] (audio_device_impl.cc:365): InitSpeaker

[000:039][44807] (audio_device_impl.cc:580): StereoPlayoutIsAvailable

[000:039][44807] (audio_device_impl.cc:587): output: 0

[000:039][44807] (audio_device_impl.cc:592): SetStereoPlayout(0)

[000:040][44807] (audio_device_ios.mm:1062): SetStereoPlayout: Not implemented

[000:040][44807] (audio_device_impl.cc:600): stereo playout is not supported

[000:040][44807] (adm_helpers.cc:57): Failed to set stereo playout mode.

[000:040][44807] (unity_audio_device.h:142): SetRecordingDevice(0)

[000:040][44807] (audio_device_impl.cc:738): SetRecordingDevice(0)

[000:040][44807] (audio_device_ios.mm:1111): SetRecordingDevice: Not implemented

[000:040][44807] (audio_device_impl.cc:371): InitMicrophone

[000:040][44807] (audio_device_impl.cc:534): StereoRecordingIsAvailable

[000:040][44807] (audio_device_impl.cc:541): output: 0

[000:040][44807] (audio_device_impl.cc:546): SetStereoRecording(0)

[000:040][44807] (audio_device_ios.mm:1047): SetStereoRecording: Not implemented

[000:040][44807] (adm_helpers.cc:77): Failed to set stereo recording mode.

[000:042][44807] (unity_audio_device.h:77): RegisterAudioCallback

[000:042][44807] (audio_device_impl.cc:851): RegisterAudioCallback

[000:042][44807] (audio_device_buffer.cc:82): RegisterAudioCallback

[000:042][44807] (webrtc_voice_engine.cc:367): WebRtcVoiceEngine::ApplyOptions: AudioOptions {aec: 1, agc: 1, ns: 1, hf: 1, swap: 0, audio_jitter_buffer_max_packets: 200, audio_jitter_buffer_fast_accelerate: 0, audio_jitter_buffer_min_delay_ms: 0, audio_jitter_buffer_enable_rtx_handling: 0, typing: 1, experimental_agc: 0, experimental_ns: 0, residual_echo_detector: 1, }

[000:042][44807] (webrtc_voice_engine.cc:386): Always disable AEC on iOS. Use built-in instead.

[000:043][44807] (webrtc_voice_engine.cc:398): Always disable NS on iOS. Use built-in instead.

[000:043][44807] (webrtc_voice_engine.cc:409): Always disable AGC on iOS. Use built-in instead.

[000:043][44807] (webrtc_voice_engine.cc:482): Stereo swapping enabled? 0

[000:043][44807] (webrtc_voice_engine.cc:487): NetEq capacity is 200

[000:043][44807] (webrtc_voice_engine.cc:493): NetEq fast mode? 0

[000:044][44807] (webrtc_voice_engine.cc:499): NetEq minimum delay is 0

[000:044][44807] (webrtc_voice_engine.cc:505): NetEq handle reordered packets? 0

[000:044][44807] (webrtc_voice_engine.cc:525): Experimental ns is enabled? 0

[000:044][44807] (webrtc_voice_engine.cc:576): NS set to 0

[000:044][44807] (webrtc_voice_engine.cc:580): Typing detection is enabled? 0

[000:044][44807] (audio_processing_impl.cc:529): AudioProcessing::ApplyConfig: AudioProcessing::Config{ pipeline: {maximum_internal_processing_rate: 32000, multi_channel_render: 0, , multi_channel_capture: 0}, pre_amplifier: { enabled: 0, fixed_gain_factor: 1 }, high_pass_filter: { enabled: 1 }, echo_canceller: { enabled: 0, mobile_mode: 0, enforce_high_pass_filtering: 1 }, noise_suppression: { enabled: 0, level: High }, transient_suppression: { enabled: 0 }, voice_detection: { enabled: 0 }, gain_controller1: { enabled: 0, mode: FixedDigital, target_level_dbfs: 3, compression_gain_db: 9, enable_limiter: 1, analog_level_minimum: 0, analog_level_maximum: 255 }, gain_controller2: { enabled: 0, fixed_digital: { gain_db: 0 }, adaptive_digital: { enabled: 0, level_estimator: Rms, use_saturation_protector: 1, extra_saturation_margin_db: 2 } }, residual_echo_detector: { enabled: 1 }, level_estimation: { enabled: 0 } }

[000:044][259] (rtc_manager.cpp:159): Init: AudioOptions {}

[000:046][259] (sora.cpp:199): Start Signaling: url=wss://<my-domain>:5443/WebRTCAppEE/websocket channel_id=<my-id>

libc++abi: terminating with uncaught exception of type boost::wrapexcept<boost::system::system_error>: context: asio.ssl error

terminating with uncaught exception of type boost::wrapexcept<boost::system::system_error>: context: asio.ssl error

This happens just after I run the "OnClickStart()" function.
It only happens in my own project and can't really reproduce it on standard projects.

Nonetheless, sample projects can connect to the same exact server without any problem, so I'm 100% sure the issue isn't on the server itself, but rather in the app itself.

If anyone can help somehow, please let me know!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...