Jump to content
  • 0

App Crash after updating WebRTC.xcframework WebRTC stack to m108


Tuan Anh
 Share

Question

Hi Ant Media team,

I'm writing an application to stream 1 mp3 file to Ant Media Server.

I using these settings

          self.rtcAudioSession.lockForConfiguration()

        

        self.rtcAudioSession.useManualAudio = true

        self.rtcAudioSession.isAudioEnabled = false

        

        self.rtcAudioSession.unlockForConfiguration()

                   

         self.publisherClient =  AntMediaClient.init();

       self.publisherClient?.delegate = self

       self.publisherClient?.setOptions(url: self.clientUrl, streamId: self.publisherStreamId, token: "", mode: AntMediaClientMode.publish, enableDataChannel: false, captureScreenEnabled: true)

                

                //Tat Camera

     self.publisherClient?.setVideoEnable(enable: false);

     self.publisherClient?.setExternalVideoCapture(externalVideoCapture: true);

     self.publisherClient?.setTargetResolution(width: 1280, height: 720);

                //self.publisherClient?.setLocalView(container: self.localView, mode: .scaleAspectFit)

     self.publisherClient?.setExternalAudio(externalAudioEnabled: true)

     self.publisherClient?.initPeerConnection()

     self.publisherClient?.start()

 

Everything is OK with Old WebRTC (stack to m106) but it crashed after updating WebRTC (stack to m108)

It crashed at this function WebRTC`-[RTCVideoEncoderSettings maxFramerate]

Hope that you can help me find out the reason of this error. Thank you!

 

WebRTC`-[RTCVideoEncoderSettings maxFramerate]:

->  0x1026549c0 <+0>: ldr    w0, [x0, #0x18]

    0x1026549c4 <+4>: ret    

WebRTC`webrtc::ios_adm::AudioDeviceIOS::StartRecording:

    0x10275a5dc <+0>:   sub    sp, sp, #0x60

    0x10275a5e0 <+4>:   stp    x24, x23, [sp, #0x20]

    0x10275a5e4 <+8>:   stp    x22, x21, [sp, #0x30]

    0x10275a5e8 <+12>:  stp    x20, x19, [sp, #0x40]

    0x10275a5ec <+16>:  stp    x29, x30, [sp, #0x50]

    0x10275a5f0 <+20>:  add    x29, sp, #0x50

    0x10275a5f4 <+24>:  bl     0x10275d560               ; OUTLINED_FUNCTION_19

    0x10275a5f8 <+28>:  adrp   x23, 1253

    0x10275a5fc <+32>:  add    x23, x23, #0xdf4          ; "StartRecording"

    0x10275a600 <+36>:  adrp   x21, 1254

    0x10275a604 <+40>:  add    x21, x21, #0x644          ; "../../sdk/objc/native/src/audio/audio_device_ios.mm"

    0x10275a608 <+44>:  tbnz   w0, #0x0, 0x10275a62c     ; <+80>

    0x10275a60c <+48>:  adrp   x8, 1254

    0x10275a610 <+52>:  add    x8, x8, #0x678            ; "AudioDeviceIOS::"

    0x10275a614 <+56>:  stp    x8, x23, [sp, #0x10]

    0x10275a618 <+60>:  mov    w8, #0x891

    0x10275a61c <+64>:  stp    x21, x8, [sp]

    0x10275a620 <+68>:  adrp   x0, 1006

    0x10275a624 <+72>:  add    x0, x0, #0xb63            ; void rtc::webrtc_logging_impl::LogStreamer<>::Call<rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)13, rtc::webrtc_logging_impl::LogMetadata>, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*>, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*> >(rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)13, rtc::webrtc_logging_impl::LogMetadata> const&, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*> const&, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*> const&)::t

    0x10275a628 <+76>:  bl     0x102695ba8               ; rtc::webrtc_logging_impl::Log(rtc::webrtc_logging_impl::LogArgType const*, ...)

    0x10275a62c <+80>:  ldr    x0, [x19, #0xb8]

    0x10275a630 <+84>:  cbz    x0, 0x10275a638           ; <+92>

    0x10275a634 <+88>:  bl     0x10274efac               ; webrtc::FineAudioBuffer::ResetRecord()

    0x10275a638 <+92>:  add    x8, x19, #0xdc

    0x10275a63c <+96>:  ldar   w8, [x8]

    0x10275a640 <+100>: cbnz   w8, 0x10275a720           ; <+324>

    0x10275a644 <+104>: bl     0x10275d608               ; OUTLINED_FUNCTION_45

->  0x10275a648 <+108>: cmp    w0, #0x2

    0x10275a64c <+112>: b.ne   0x10275a720               ; <+324>

    0x10275a650 <+116>: ldr    x0, [x19, #0xb0]

    0x10275a654 <+120>: bl     0x10275f9ac               ; webrtc::ios_adm::VoiceProcessingAudioUnit::Start()

    0x10275a658 <+124>: cbz    w0, 0x10275a6f8           ; <+284>

    0x10275a65c <+128>: mov    x20, x0

    0x10275a660 <+132>: adrp   x8, 1421

    0x10275a664 <+136>: ldr    x0, [x8, #0xc8]

    0x10275a668 <+140>: adrp   x8, 1420

    0x10275a66c <+144>: ldr    x1, [x8, #0x7a8]

    0x10275a670 <+148>: bl     0x102b460a0               ; symbol stub for: objc_msgSend

    0x10275a674 <+152>: mov    x29, x29

    0x10275a678 <+156>: bl     0x102b460d0               ; symbol stub for: objc_retainAutoreleasedReturnValue

    0x10275a67c <+160>: mov    x19, x0

    0x10275a680 <+164>: adrp   x8, 1420

    0x10275a684 <+168>: ldr    x1, [x8, #0xbf8]

    0x10275a688 <+172>: mov    x2, x20

    0x10275a68c <+176>: bl     0x102b460a0               ; symbol stub for: objc_msgSend

    0x10275a690 <+180>: adrp   x8, 1420

    0x10275a694 <+184>: ldr    x22, [x8, #0xde8]

    0x10275a698 <+188>: adrp   x0, 1254

    0x10275a69c <+192>: add    x0, x0, #0x644            ; "../../sdk/objc/native/src/audio/audio_device_ios.mm"

    0x10275a6a0 <+196>: bl     0x102654410               ; RTCFileName

    0x10275a6a4 <+200>: mov    x29, x29

    0x10275a6a8 <+204>: bl     0x102b460d0               ; symbol stub for: objc_retainAutoreleasedReturnValue

    0x10275a6ac <+208>: mov    x21, x0

    0x10275a6b0 <+212>: adrp   x8, 1419

    0x10275a6b4 <+216>: ldr    x1, [x8, #0x608]

    0x10275a6b8 <+220>: stp    x23, x20, [sp, #0x10]

    0x10275a6bc <+224>: mov    w8, #0x11f

    0x10275a6c0 <+228>: stp    x0, x8, [sp]

    0x10275a6c4 <+232>: adrp   x2, 1423

    0x10275a6c8 <+236>: add    x2, x2, #0xe78            ; @"(%@:%d %s): StartRecording failed to start audio unit, reason %d"

    0x10275a6cc <+240>: mov    x0, x22

    0x10275a6d0 <+244>: bl     0x102b460a0               ; symbol stub for: objc_msgSend

    0x10275a6d4 <+248>: mov    x29, x29

    0x10275a6d8 <+252>: bl     0x102b460d0               ; symbol stub for: objc_retainAutoreleasedReturnValue

    0x10275a6dc <+256>: mov    x20, x0

    0x10275a6e0 <+260>: bl     0x102656174               ; OUTLINED_FUNCTION_1

    0x10275a6e4 <+264>: bl     0x10275d5e4               ; OUTLINED_FUNCTION_39

    0x10275a6e8 <+268>: bl     0x102654938               ; OUTLINED_FUNCTION_1

    0x10275a6ec <+272>: bl     0x102654940               ; OUTLINED_FUNCTION_2

    0x10275a6f0 <+276>: mov    w0, #-0x1

    0x10275a6f4 <+280>: b      0x10275a730               ; <+340>

    0x10275a6f8 <+284>: bl     0x102575f20               ; bool rtc::LogMessage::IsNoop<(rtc::LoggingSeverity)1>()

    0x10275a6fc <+288>: tbnz   w0, #0x0, 0x10275a720     ; <+324>

    0x10275a700 <+292>: adrp   x8, 1254

    0x10275a704 <+296>: add    x9, x8, #0x741            ; "Voice-Processing I/O audio unit is now started"

    0x10275a708 <+300>: mov    w8, #0x911

    0x10275a70c <+304>: stp    x8, x9, [sp, #0x8]

    0x10275a710 <+308>: str    x21, [sp]

    0x10275a714 <+312>: adrp   x0, 1006

    0x10275a718 <+316>: add    x0, x0, #0xb60            ; void rtc::webrtc_logging_impl::LogStreamer<>::Call<rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)13, rtc::webrtc_logging_impl::LogMetadata>, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*> >(rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)13, rtc::webrtc_logging_impl::LogMetadata> const&, rtc::webrtc_logging_impl::Val<(rtc::webrtc_logging_impl::LogArgType)9, char const*> const&)::t

    0x10275a71c <+320>: bl     0x102695ba8               ; rtc::webrtc_logging_impl::Log(rtc::webrtc_logging_impl::LogArgType const*, ...)

    0x10275a720 <+324>: mov    w0, #0x0

    0x10275a724 <+328>: add    x8, x19, #0xd8

    0x10275a728 <+332>: mov    w9, #0x1

    0x10275a72c <+336>: stlr   w9, [x8]

    0x10275a730 <+340>: ldp    x29, x30, [sp, #0x50]

    0x10275a734 <+344>: b      0x102651a7c               ; OUTLINED_FUNCTION_21

    0x10275a738 <+348>: mov    x1, x20

    0x10275a73c <+352>: mov    x20, x0

    0x10275a740 <+356>: mov    x0, x1

    0x10275a744 <+360>: b      0x10275a74c               ; <+368>

    0x10275a748 <+364>: bl     0x1026676c0               ; OUTLINED_FUNCTION_93

    0x10275a74c <+368>: bl     0x102b46094               ; symbol stub for: objc_release

    0x10275a750 <+372>: b      0x10275a75c               ; <+384>

    0x10275a754 <+376>: b      0x10275a758               ; <+380>

    0x10275a758 <+380>: mov    x20, x0

    0x10275a75c <+384>: bl     0x102654940               ; OUTLINED_FUNCTION_2

    0x10275a760 <+388>: bl     0x10264ecbc               ; OUTLINED_FUNCTION_18

 

Screen Shot 2023-01-16 at 17.41.02.png

Screen Shot 2023-01-16 at 17.41.27.png

Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

4 answers to this question

Recommended Posts

  • 0

if I delete this line         self.rtcAudioSession.useManualAudio = true

It doesn't crash anymore. However, the audio sent to Server if from the device microphone, not mp3 file anymore. So that I want to still use this line self.rtcAudioSession.useManualAudio = true

Link to comment
Share on other sites

  • 0

Hi @Selim,

To stream Mp3 file, I get Audio Data from Mp3 File  and sent these data through this function self.publisherClient?.deliverExternalAudio(sampleBuffer: cmSampleBuffer!)

Everything works OK with old WebRTC version (m96) . I received audio data on Server and can Listened sound on Web Preview.  But now with new WebRTC, it crashed.

Best regards,

Tuấn Anh

 

 

Edited by Tuan Anh
Link to comment
Share on other sites

 Share

×
×
  • Create New...