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

[IOS] App is frozen when dismiss ViewController #106

Closed
devgokhan opened this issue Nov 18, 2020 · 8 comments
Closed

[IOS] App is frozen when dismiss ViewController #106

devgokhan opened this issue Nov 18, 2020 · 8 comments
Assignees
Labels
Bug Something isn't working Calling Issue involves Calling functionality. iOS Issues involving the iOS SDK

Comments

@devgokhan
Copy link

devgokhan commented Nov 18, 2020

Hi. When I call dismiss to ViewController application is frozen and takes no action.

This happened before when I call start local video capture or dispose and short after something to resolving this problem I did use dispatchAsync.main.after some seconds and I resolved the problems with this ways.. Anyway.. With same way to resolve freeze I tried to dispose and remove the objects before call dismiss but still I can't fixed it yet.

Is there something I do before closing the page (ViewController) ?

var callClient: ACSCallClient?
    var callAgent: ACSCallAgent?
    var call: ACSCall?
    var localRenderer: ACSRenderer?
    var remoteRenderer: ACSRenderer?
    var userCredential: CommunicationUserCredential?
    var remoteParticipants = [ACSRemoteParticipant]()
    var targetRemoteParticipantView: ACSRendererView?
    var localVRendererView: ACSRendererView?

 @IBAction func closeTapped(_ sender: Any) {
        self.close()
    }

func close() {
        Utils.log("Meeting -> Closing..")
        self.targetRemoteParticipantView?.dispose()
        self.localVRendererView?.dispose()
        self.localRenderer?.dispose()
        self.remoteRenderer?.dispose()
        
        if let call = self.call {
            Utils.log("Meeting -> Hangup starting..")
            call.hangup(ACSHangupOptions(), withCompletionHandler: { (error) in
                if let error = error {
                    Utils.log("Meeting -> Hangup error: \(error.localizedDescription)")
                }
                Utils.log("Meeting -> Hangup completed!")
                self.dismiss()
            })
        } else {
            Utils.log("Meeting -> Will dismiss - there is no call avaible")
            self.dismiss()
        }
    }
    
    func dismiss() {
        self.call = nil
        self.callAgent = nil
        self.userCredential = nil
        if self.remoteParticipants.count > 0 {
            for item in self.remoteParticipants {
                item.delegate = nil
            }
        }
        self.remoteParticipants.removeAll()
       
        DispatchQueue.main.asyncAfter(deadline: .now() + 1.0) {
            Utils.log("Meeting -> Screen dismissing")
            self.dismiss(animated: true, completion: nil)
        }
    }
@ghost ghost added the Needs: triage 🔍 label Nov 18, 2020
@devgokhan devgokhan changed the title [IOS] App frozen when dismiss ViewController [IOS] App is frozen when dismiss ViewController Nov 18, 2020
@mariusu-msft
Copy link
Member

@sankum-msft can you take a look please?

@mariusu-msft mariusu-msft added Bug Something isn't working Calling Issue involves Calling functionality. iOS Issues involving the iOS SDK and removed Needs: triage 🔍 labels Nov 18, 2020
@raosanat
Copy link
Member

Hi @devgokhan this is most likely a issue that we are aware of and we have a fix for this coming in an upcoming release. Meanwhile to confirm its the same issue , can you please provide logs ?
You can follow the instructions below to get the logs

https://docs.microsoft.com/en-us/azure/communication-services/concepts/troubleshooting-info?tabs=csharp%2Cios%2Cdotnet#tabpanel_CeZOj-G++Q-3_ios

@sankum-msft
Copy link
Contributor

Hi @devgokhan!
You are hitting a known bug in ACSCallAgent's destructor. I was able to repro this issue locally using your code and have verified that root cause is the issue @raosanat mentioned.

We have a fix for this issue which is going to be rolled out as part of the next release.

@devgokhan
Copy link
Author

devgokhan commented Nov 19, 2020

Hi thank you both. @raosanat according to @sankum-msft last comment this is known issue, if you still need these logs please tell me then I will attach the logs here.

@sankum-msft I saw new version released yesterday? Did you mean this version?

Yesterday a new version released. https://github.com/Azure/Communication/blob/master/releasenotes/2020-November-18.md
Today I tried it with reintegrate the pod and install all again. (According to Podfile.lock: AzureCommunicationCalling (1.0.0-beta.5))
With last framework, I am able to close the screen before joining to call. In previous one I remember that I was unable to do that. But after joined to call I am still unable to close the screen - in last framework app is crashes:
Thread 23: EXC_BAD_ACCESS (code=1, address=0x300000020). (Line 111 below)

AzureCommunicationCalling`sam_call_agent::onPropertyChange:
    0x1034f4568 <+0>:    sub    sp, sp, #0x90             ; =0x90 
    0x1034f456c <+4>:    stp    x26, x25, [sp, #0x40]
    0x1034f4570 <+8>:    stp    x24, x23, [sp, #0x50]
    0x1034f4574 <+12>:   stp    x22, x21, [sp, #0x60]
    0x1034f4578 <+16>:   stp    x20, x19, [sp, #0x70]
    0x1034f457c <+20>:   stp    x29, x30, [sp, #0x80]
    0x1034f4580 <+24>:   add    x29, sp, #0x80            ; =0x80 
    0x1034f4584 <+28>:   mov    x20, x1
    0x1034f4588 <+32>:   mov    x19, x0
    0x1034f458c <+36>:   mov    w8, #0x1429
    0x1034f4590 <+40>:   cmp    w2, w8
    0x1034f4594 <+44>:   b.ne   0x1034f46c4               ; <+348>
    0x1034f4598 <+48>:   cmp    w3, #0x15                 ; =0x15 
    0x1034f459c <+52>:   b.ne   0x1034f4a00               ; <+1176>
    0x1034f45a0 <+56>:   adrp   x24, 6831
    0x1034f45a4 <+60>:   add    x24, x24, #0x7d0          ; =0x7d0 
    0x1034f45a8 <+64>:   ldr    x0, [x24]
    0x1034f45ac <+68>:   ldr    w8, [x0]
    0x1034f45b0 <+72>:   cmp    w8, #0x14                 ; =0x14 
    0x1034f45b4 <+76>:   b.gt   0x1034f45d8               ; <+112>
    0x1034f45b8 <+80>:   str    xzr, [sp, #0x20]
    0x1034f45bc <+84>:   adrp   x3, 5980
    0x1034f45c0 <+88>:   add    x3, x3, #0x7b1            ; =0x7b1 
    0x1034f45c4 <+92>:   add    x4, sp, #0x20             ; =0x20 
    0x1034f45c8 <+96>:   mov    w1, #0x8c14
    0x1034f45cc <+100>:  movk   w1, #0x1, lsl #16
    0x1034f45d0 <+104>:  mov    w2, #0x0
    0x1034f45d4 <+108>:  bl     0x103b01820               ; auf::LogComponent::log(unsigned int, unsigned int, char const*, auf::LogArgs const&)
    0x1034f45d8 <+112>:  add    x21, x19, #0x50           ; =0x50 
    0x1034f45dc <+116>:  add    x22, x19, #0x48           ; =0x48 
    0x1034f45e0 <+120>:  add    x23, x19, #0x90           ; =0x90 
    0x1034f45e4 <+124>:  mov    x8, sp
    0x1034f45e8 <+128>:  bl     0x10350e128               ; generateGuid()
    0x1034f45ec <+132>:  mov    w0, #0x128
    0x1034f45f0 <+136>:  bl     0x1049e4a20               ; symbol stub for: operator new(unsigned long)
    0x1034f45f4 <+140>:  ldr    x8, [sp, #0x10]
    0x1034f45f8 <+144>:  stp    x8, xzr, [sp, #0x30]
    0x1034f45fc <+148>:  ldr    q0, [sp]
    0x1034f4600 <+152>:  str    q0, [sp, #0x20]
    0x1034f4604 <+156>:  stp    xzr, xzr, [sp]
    0x1034f4608 <+160>:  str    xzr, [sp, #0x10]
    0x1034f460c <+164>:  add    x3, sp, #0x38             ; =0x38 
    0x1034f4610 <+168>:  add    x6, sp, #0x20             ; =0x20 
    0x1034f4614 <+172>:  mov    x5, x20
    0x1034f4618 <+176>:  mov    x1, x21
    0x1034f461c <+180>:  mov    x2, x22
    0x1034f4620 <+184>:  mov    x4, x23
    0x1034f4624 <+188>:  bl     0x1034eb1bc               ; sam_call::sam_call(rt::IntrusivePtr<ISkyLib> const&, rt::IntrusivePtr<ICallHandler> const&, rt::IntrusivePtr<sam_local_video_stream> const&, rt::IntrusivePtr<auf::IStrand> const&, unsigned int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)
    0x1034f4628 <+192>:  str    x0, [sp, #0x18]
    0x1034f462c <+196>:  ldrsb  w8, [sp, #0x37]
    0x1034f4630 <+200>:  tbz    w8, #0x1f, 0x1034f463c    ; <+212>
    0x1034f4634 <+204>:  ldr    x0, [sp, #0x20]
    0x1034f4638 <+208>:  bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f463c <+212>:  ldr    x8, [sp, #0x38]
    0x1034f4640 <+216>:  cbz    x8, 0x1034f4658           ; <+240>
    0x1034f4644 <+220>:  ldr    x9, [x8]
    0x1034f4648 <+224>:  ldur   x9, [x9, #-0x58]
    0x1034f464c <+228>:  add    x0, x8, x9
    0x1034f4650 <+232>:  bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4654 <+236>:  str    xzr, [sp, #0x38]
    0x1034f4658 <+240>:  ldrsb  w8, [sp, #0x17]
    0x1034f465c <+244>:  tbnz   w8, #0x1f, 0x1034f47cc    ; <+612>
    0x1034f4660 <+248>:  mov    x22, x19
    0x1034f4664 <+252>:  ldr    x23, [x22, #0xa8]!
    0x1034f4668 <+256>:  cbz    x23, 0x1034f47e0          ; <+632>
    0x1034f466c <+260>:  add    x22, x19, #0xa8           ; =0xa8 
    0x1034f4670 <+264>:  ldr    w8, [x23, #0x20]
    0x1034f4674 <+268>:  cmp    w8, w20
    0x1034f4678 <+272>:  b.ls   0x1034f46a0               ; <+312>
    0x1034f467c <+276>:  b      0x1034f4694               ; <+300>
    0x1034f4680 <+280>:  mov    x22, x23
    0x1034f4684 <+284>:  mov    x23, x8
    0x1034f4688 <+288>:  ldr    w8, [x23, #0x20]
    0x1034f468c <+292>:  cmp    w8, w20
    0x1034f4690 <+296>:  b.ls   0x1034f46a0               ; <+312>
    0x1034f4694 <+300>:  ldr    x8, [x23]
    0x1034f4698 <+304>:  cbnz   x8, 0x1034f4680           ; <+280>
    0x1034f469c <+308>:  b      0x1034f4824               ; <+700>
    0x1034f46a0 <+312>:  b.hs   0x1034f47e4               ; <+636>
    0x1034f46a4 <+316>:  mov    x22, x23
    0x1034f46a8 <+320>:  ldr    x8, [x22, #0x8]!
    0x1034f46ac <+324>:  cbz    x8, 0x1034f47e4           ; <+636>
    0x1034f46b0 <+328>:  mov    x23, x8
    0x1034f46b4 <+332>:  ldr    w8, [x23, #0x20]
    0x1034f46b8 <+336>:  cmp    w8, w20
    0x1034f46bc <+340>:  b.ls   0x1034f46a0               ; <+312>
    0x1034f46c0 <+344>:  b      0x1034f4694               ; <+300>
    0x1034f46c4 <+348>:  cmp    w2, #0x361                ; =0x361 
    0x1034f46c8 <+352>:  b.ne   0x1034f4a00               ; <+1176>
    0x1034f46cc <+356>:  cbnz   w3, 0x1034f4a00           ; <+1176>
    0x1034f46d0 <+360>:  adrp   x23, 6831
    0x1034f46d4 <+364>:  add    x23, x23, #0x7d0          ; =0x7d0 
    0x1034f46d8 <+368>:  ldr    x0, [x23]
    0x1034f46dc <+372>:  ldr    w8, [x0]
    0x1034f46e0 <+376>:  cmp    w8, #0x14                 ; =0x14 
    0x1034f46e4 <+380>:  b.gt   0x1034f4708               ; <+416>
    0x1034f46e8 <+384>:  str    xzr, [sp, #0x20]
    0x1034f46ec <+388>:  adrp   x3, 5980
    0x1034f46f0 <+392>:  add    x3, x3, #0x7e0            ; =0x7e0 
    0x1034f46f4 <+396>:  add    x4, sp, #0x20             ; =0x20 
    0x1034f46f8 <+400>:  mov    w1, #0xa214
    0x1034f46fc <+404>:  movk   w1, #0x1, lsl #16
    0x1034f4700 <+408>:  mov    w2, #0x0
    0x1034f4704 <+412>:  bl     0x103b01820               ; auf::LogComponent::log(unsigned int, unsigned int, char const*, auf::LogArgs const&)
    0x1034f4708 <+416>:  mov    x8, x19
    0x1034f470c <+420>:  ldr    x24, [x8, #0xa8]!
    0x1034f4710 <+424>:  cbz    x24, 0x1034f4a00          ; <+1176>
    0x1034f4714 <+428>:  mov    x21, x8
    0x1034f4718 <+432>:  mov    x9, x24
->  0x1034f471c <+436>:  ldr    w10, [x9, #0x20]
    0x1034f4720 <+440>:  cmp    w10, w20
    0x1034f4724 <+444>:  cset   w10, lo
    0x1034f4728 <+448>:  csel   x21, x21, x9, lo
    0x1034f472c <+452>:  ldr    x9, [x9, w10, uxtw #3]
    0x1034f4730 <+456>:  cbnz   x9, 0x1034f471c           ; <+436>
    0x1034f4734 <+460>:  cmp    x21, x8
    0x1034f4738 <+464>:  b.eq   0x1034f4a00               ; <+1176>
    0x1034f473c <+468>:  ldr    w8, [x21, #0x20]
    0x1034f4740 <+472>:  cmp    w8, w20
    0x1034f4744 <+476>:  b.hi   0x1034f4a00               ; <+1176>
    0x1034f4748 <+480>:  add    x25, x19, #0xa8           ; =0xa8 
    0x1034f474c <+484>:  ldr    w8, [x24, #0x20]
    0x1034f4750 <+488>:  cmp    w8, w20
    0x1034f4754 <+492>:  b.ls   0x1034f477c               ; <+532>
    0x1034f4758 <+496>:  b      0x1034f476c               ; <+516>
    0x1034f475c <+500>:  mov    x24, x8
    0x1034f4760 <+504>:  ldr    w8, [x24, #0x20]
    0x1034f4764 <+508>:  cmp    w8, w20
    0x1034f4768 <+512>:  b.ls   0x1034f477c               ; <+532>
    0x1034f476c <+516>:  ldr    x8, [x24]
    0x1034f4770 <+520>:  mov    x25, x24
    0x1034f4774 <+524>:  cbnz   x8, 0x1034f475c           ; <+500>
    0x1034f4778 <+528>:  b      0x1034f478c               ; <+548>
    0x1034f477c <+532>:  b.hs   0x1034f478c               ; <+548>
    0x1034f4780 <+536>:  mov    x25, x24
    0x1034f4784 <+540>:  ldr    x8, [x25, #0x8]!
    0x1034f4788 <+544>:  cbnz   x8, 0x1034f475c           ; <+500>
    0x1034f478c <+548>:  ldr    x22, [x25]
    0x1034f4790 <+552>:  cbnz   x22, 0x1034f4a34          ; <+1228>
    0x1034f4794 <+556>:  orr    w0, wzr, #0x30
    0x1034f4798 <+560>:  bl     0x1049e4a20               ; symbol stub for: operator new(unsigned long)
    0x1034f479c <+564>:  mov    x22, x0
    0x1034f47a0 <+568>:  str    w20, [x0, #0x20]
    0x1034f47a4 <+572>:  str    xzr, [x0, #0x28]
    0x1034f47a8 <+576>:  stp    xzr, xzr, [x0]
    0x1034f47ac <+580>:  str    x24, [x0, #0x10]
    0x1034f47b0 <+584>:  str    x0, [x25]
    0x1034f47b4 <+588>:  ldr    x8, [x19, #0xa0]
    0x1034f47b8 <+592>:  ldr    x8, [x8]
    0x1034f47bc <+596>:  cbz    x8, 0x1034f4a1c           ; <+1204>
    0x1034f47c0 <+600>:  str    x8, [x19, #0xa0]
    0x1034f47c4 <+604>:  ldr    x1, [x25]
    0x1034f47c8 <+608>:  b      0x1034f4a20               ; <+1208>
    0x1034f47cc <+612>:  ldr    x0, [sp]
    0x1034f47d0 <+616>:  bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f47d4 <+620>:  mov    x22, x19
    0x1034f47d8 <+624>:  ldr    x23, [x22, #0xa8]!
    0x1034f47dc <+628>:  cbnz   x23, 0x1034f466c          ; <+260>
    0x1034f47e0 <+632>:  mov    x23, x22
    0x1034f47e4 <+636>:  ldr    x21, [x22]
    0x1034f47e8 <+640>:  cbnz   x21, 0x1034f484c          ; <+740>
    0x1034f47ec <+644>:  orr    w0, wzr, #0x30
    0x1034f47f0 <+648>:  bl     0x1049e4a20               ; symbol stub for: operator new(unsigned long)
    0x1034f47f4 <+652>:  mov    x21, x0
    0x1034f47f8 <+656>:  str    w20, [x0, #0x20]
    0x1034f47fc <+660>:  str    xzr, [x0, #0x28]
    0x1034f4800 <+664>:  stp    xzr, xzr, [x0]
    0x1034f4804 <+668>:  str    x23, [x0, #0x10]
    0x1034f4808 <+672>:  str    x0, [x22]
    0x1034f480c <+676>:  ldr    x8, [x19, #0xa0]
    0x1034f4810 <+680>:  ldr    x8, [x8]
    0x1034f4814 <+684>:  cbz    x8, 0x1034f4834           ; <+716>
    0x1034f4818 <+688>:  str    x8, [x19, #0xa0]
    0x1034f481c <+692>:  ldr    x1, [x22]
    0x1034f4820 <+696>:  b      0x1034f4838               ; <+720>
    0x1034f4824 <+700>:  mov    x22, x23
    0x1034f4828 <+704>:  ldr    x21, [x22]
    0x1034f482c <+708>:  cbnz   x21, 0x1034f484c          ; <+740>
    0x1034f4830 <+712>:  b      0x1034f47ec               ; <+644>
    0x1034f4834 <+716>:  mov    x1, x21
    0x1034f4838 <+720>:  ldr    x0, [x19, #0xa8]
    0x1034f483c <+724>:  bl     0x103b7e1d0               ; void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*)
    0x1034f4840 <+728>:  ldr    x8, [x19, #0xb0]
    0x1034f4844 <+732>:  add    x8, x8, #0x1              ; =0x1 
    0x1034f4848 <+736>:  str    x8, [x19, #0xb0]
    0x1034f484c <+740>:  ldr    x20, [x21, #0x28]
    0x1034f4850 <+744>:  ldr    x8, [sp, #0x18]
    0x1034f4854 <+748>:  str    x8, [x21, #0x28]
    0x1034f4858 <+752>:  cbz    x8, 0x1034f486c           ; <+772>
    0x1034f485c <+756>:  ldr    x9, [x8]
    0x1034f4860 <+760>:  ldur   x9, [x9, #-0x58]
    0x1034f4864 <+764>:  add    x0, x8, x9
    0x1034f4868 <+768>:  bl     0x103b80814               ; rt::intrusive_ptr_add_ref(rt::IReferenceCountable const*)
    0x1034f486c <+772>:  cbz    x20, 0x1034f4880          ; <+792>
    0x1034f4870 <+776>:  ldr    x8, [x20]
    0x1034f4874 <+780>:  ldur   x8, [x8, #-0x58]
    0x1034f4878 <+784>:  add    x0, x20, x8
    0x1034f487c <+788>:  bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4880 <+792>:  stp    xzr, xzr, [sp, #0x28]
    0x1034f4884 <+796>:  str    xzr, [sp, #0x20]
    0x1034f4888 <+800>:  add    x0, sp, #0x20             ; =0x20 
    0x1034f488c <+804>:  add    x1, sp, #0x18             ; =0x18 
    0x1034f4890 <+808>:  bl     0x1034f51e4               ; void std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > >::__push_back_slow_path<rt::IntrusivePtr<sam_call> const&>(rt::IntrusivePtr<sam_call> const&)
    0x1034f4894 <+812>:  stp    xzr, xzr, [sp, #0x8]
    0x1034f4898 <+816>:  str    xzr, [sp]
    0x1034f489c <+820>:  mov    w0, #0x50
    0x1034f48a0 <+824>:  bl     0x1049e4a20               ; symbol stub for: operator new(unsigned long)
    0x1034f48a4 <+828>:  mov    x20, x0
    0x1034f48a8 <+832>:  adrp   x8, 6278
    0x1034f48ac <+836>:  add    x8, x8, #0xe80            ; =0xe80 
    0x1034f48b0 <+840>:  str    x8, [x0]
    0x1034f48b4 <+844>:  adrp   x1, 6278
    0x1034f48b8 <+848>:  add    x1, x1, #0x808            ; =0x808 
    0x1034f48bc <+852>:  add    x2, sp, #0x20             ; =0x20 
    0x1034f48c0 <+856>:  mov    x3, sp
    0x1034f48c4 <+860>:  bl     0x1034f5340               ; collection_updated_event_args<sam_call>::collection_updated_event_args(std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > > const&, std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > > const&)
    0x1034f48c8 <+864>:  adrp   x8, 6278
    0x1034f48cc <+868>:  add    x8, x8, #0x7b8            ; =0x7b8 
    0x1034f48d0 <+872>:  str    x8, [x0]
    0x1034f48d4 <+876>:  ldr    x21, [sp]
    0x1034f48d8 <+880>:  cbz    x21, 0x1034f4928          ; <+960>
    0x1034f48dc <+884>:  ldr    x23, [sp, #0x8]
    0x1034f48e0 <+888>:  cmp    x23, x21
    0x1034f48e4 <+892>:  b.eq   0x1034f491c               ; <+948>
    0x1034f48e8 <+896>:  mov    x22, x23
    0x1034f48ec <+900>:  ldr    x8, [x22, #-0x8]!
    0x1034f48f0 <+904>:  cbz    x8, 0x1034f4908           ; <+928>
    0x1034f48f4 <+908>:  ldr    x9, [x8]
    0x1034f48f8 <+912>:  ldur   x9, [x9, #-0x58]
    0x1034f48fc <+916>:  add    x0, x8, x9
    0x1034f4900 <+920>:  bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4904 <+924>:  stur   xzr, [x23, #-0x8]
    0x1034f4908 <+928>:  mov    x23, x22
    0x1034f490c <+932>:  cmp    x21, x22
    0x1034f4910 <+936>:  b.ne   0x1034f48ec               ; <+900>
    0x1034f4914 <+940>:  ldr    x0, [sp]
    0x1034f4918 <+944>:  b      0x1034f4920               ; <+952>
    0x1034f491c <+948>:  mov    x0, x21
    0x1034f4920 <+952>:  str    x21, [sp, #0x8]
    0x1034f4924 <+956>:  bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f4928 <+960>:  ldr    x8, [x19, #0x40]
    0x1034f492c <+964>:  cbz    x8, 0x1034f4940           ; <+984>
    0x1034f4930 <+968>:  ldr    x0, [x19, #0x38]
    0x1034f4934 <+972>:  mov    x1, x20
    0x1034f4938 <+976>:  blr    x8
    0x1034f493c <+980>:  b      0x1034f4980               ; <+1048>
    0x1034f4940 <+984>:  ldr    x0, [x24]
    0x1034f4944 <+988>:  ldr    w8, [x0]
    0x1034f4948 <+992>:  cmp    w8, #0x14                 ; =0x14 
    0x1034f494c <+996>:  b.gt   0x1034f4980               ; <+1048>
    0x1034f4950 <+1000>: add    x8, x19, #0x20            ; =0x20 
    0x1034f4954 <+1004>: ldrsb  w9, [x8, #0x17]
    0x1034f4958 <+1008>: tbz    w9, #0x1f, 0x1034f4960    ; <+1016>
    0x1034f495c <+1012>: ldr    x8, [x8]
    0x1034f4960 <+1016>: mov    w9, #0x801
    0x1034f4964 <+1020>: stp    x9, x8, [sp]
    0x1034f4968 <+1024>: adrp   x3, 5980
    0x1034f496c <+1028>: add    x3, x3, #0x75f            ; =0x75f 
    0x1034f4970 <+1032>: mov    x4, sp
    0x1034f4974 <+1036>: mov    w1, #0x2c14
    0x1034f4978 <+1040>: mov    w2, #0x0
    0x1034f497c <+1044>: bl     0x103b01820               ; auf::LogComponent::log(unsigned int, unsigned int, char const*, auf::LogArgs const&)
    0x1034f4980 <+1048>: ldr    x8, [x20]
    0x1034f4984 <+1052>: ldur   x8, [x8, #-0x58]
    0x1034f4988 <+1056>: add    x0, x20, x8
    0x1034f498c <+1060>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4990 <+1064>: ldr    x19, [sp, #0x20]
    0x1034f4994 <+1068>: cbz    x19, 0x1034f49e4          ; <+1148>
    0x1034f4998 <+1072>: ldr    x21, [sp, #0x28]
    0x1034f499c <+1076>: cmp    x21, x19
    0x1034f49a0 <+1080>: b.eq   0x1034f49d8               ; <+1136>
    0x1034f49a4 <+1084>: mov    x20, x21
    0x1034f49a8 <+1088>: ldr    x8, [x20, #-0x8]!
    0x1034f49ac <+1092>: cbz    x8, 0x1034f49c4           ; <+1116>
    0x1034f49b0 <+1096>: ldr    x9, [x8]
    0x1034f49b4 <+1100>: ldur   x9, [x9, #-0x58]
    0x1034f49b8 <+1104>: add    x0, x8, x9
    0x1034f49bc <+1108>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f49c0 <+1112>: stur   xzr, [x21, #-0x8]
    0x1034f49c4 <+1116>: mov    x21, x20
    0x1034f49c8 <+1120>: cmp    x19, x20
    0x1034f49cc <+1124>: b.ne   0x1034f49a8               ; <+1088>
    0x1034f49d0 <+1128>: ldr    x0, [sp, #0x20]
    0x1034f49d4 <+1132>: b      0x1034f49dc               ; <+1140>
    0x1034f49d8 <+1136>: mov    x0, x19
    0x1034f49dc <+1140>: str    x19, [sp, #0x28]
    0x1034f49e0 <+1144>: bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f49e4 <+1148>: ldr    x8, [sp, #0x18]
    0x1034f49e8 <+1152>: cbz    x8, 0x1034f4a00           ; <+1176>
    0x1034f49ec <+1156>: ldr    x9, [x8]
    0x1034f49f0 <+1160>: ldur   x9, [x9, #-0x58]
    0x1034f49f4 <+1164>: add    x0, x8, x9
    0x1034f49f8 <+1168>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f49fc <+1172>: str    xzr, [sp, #0x18]
    0x1034f4a00 <+1176>: ldp    x29, x30, [sp, #0x80]
    0x1034f4a04 <+1180>: ldp    x20, x19, [sp, #0x70]
    0x1034f4a08 <+1184>: ldp    x22, x21, [sp, #0x60]
    0x1034f4a0c <+1188>: ldp    x24, x23, [sp, #0x50]
    0x1034f4a10 <+1192>: ldp    x26, x25, [sp, #0x40]
    0x1034f4a14 <+1196>: add    sp, sp, #0x90             ; =0x90 
    0x1034f4a18 <+1200>: ret    
    0x1034f4a1c <+1204>: mov    x1, x22
    0x1034f4a20 <+1208>: ldr    x0, [x19, #0xa8]
    0x1034f4a24 <+1212>: bl     0x103b7e1d0               ; void std::__1::__tree_balance_after_insert<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*)
    0x1034f4a28 <+1216>: ldr    x8, [x19, #0xb0]
    0x1034f4a2c <+1220>: add    x8, x8, #0x1              ; =0x1 
    0x1034f4a30 <+1224>: str    x8, [x19, #0xb0]
    0x1034f4a34 <+1228>: ldr    x8, [x22, #0x28]
    0x1034f4a38 <+1232>: str    x8, [sp, #0x38]
    0x1034f4a3c <+1236>: cbz    x8, 0x1034f4a50           ; <+1256>
    0x1034f4a40 <+1240>: ldr    x9, [x8]
    0x1034f4a44 <+1244>: ldur   x9, [x9, #-0x58]
    0x1034f4a48 <+1248>: add    x0, x8, x9
    0x1034f4a4c <+1252>: bl     0x103b80814               ; rt::intrusive_ptr_add_ref(rt::IReferenceCountable const*)
    0x1034f4a50 <+1256>: ldr    x9, [x21, #0x8]
    0x1034f4a54 <+1260>: cbz    x9, 0x1034f4a68           ; <+1280>
    0x1034f4a58 <+1264>: mov    x8, x9
    0x1034f4a5c <+1268>: ldr    x9, [x9]
    0x1034f4a60 <+1272>: cbnz   x9, 0x1034f4a58           ; <+1264>
    0x1034f4a64 <+1276>: b      0x1034f4a94               ; <+1324>
    0x1034f4a68 <+1280>: mov    x9, x21
    0x1034f4a6c <+1284>: ldr    x8, [x9, #0x10]!
    0x1034f4a70 <+1288>: ldr    x10, [x8]
    0x1034f4a74 <+1292>: cmp    x10, x21
    0x1034f4a78 <+1296>: b.eq   0x1034f4a94               ; <+1324>
    0x1034f4a7c <+1300>: ldr    x10, [x9]
    0x1034f4a80 <+1304>: mov    x9, x10
    0x1034f4a84 <+1308>: ldr    x8, [x9, #0x10]!
    0x1034f4a88 <+1312>: ldr    x11, [x8]
    0x1034f4a8c <+1316>: cmp    x11, x10
    0x1034f4a90 <+1320>: b.ne   0x1034f4a7c               ; <+1300>
    0x1034f4a94 <+1324>: ldr    x9, [x19, #0xa0]
    0x1034f4a98 <+1328>: cmp    x9, x21
    0x1034f4a9c <+1332>: b.ne   0x1034f4aa4               ; <+1340>
    0x1034f4aa0 <+1336>: str    x8, [x19, #0xa0]
    0x1034f4aa4 <+1340>: ldp    x0, x8, [x19, #0xa8]
    0x1034f4aa8 <+1344>: sub    x8, x8, #0x1              ; =0x1 
    0x1034f4aac <+1348>: str    x8, [x19, #0xb0]
    0x1034f4ab0 <+1352>: mov    x1, x21
    0x1034f4ab4 <+1356>: bl     0x103b7e4c8               ; void std::__1::__tree_remove<std::__1::__tree_node_base<void*>*>(std::__1::__tree_node_base<void*>*, std::__1::__tree_node_base<void*>*)
    0x1034f4ab8 <+1360>: ldr    x8, [x21, #0x28]
    0x1034f4abc <+1364>: cbz    x8, 0x1034f4ad0           ; <+1384>
    0x1034f4ac0 <+1368>: ldr    x9, [x8]
    0x1034f4ac4 <+1372>: ldur   x9, [x9, #-0x58]
    0x1034f4ac8 <+1376>: add    x0, x8, x9
    0x1034f4acc <+1380>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4ad0 <+1384>: mov    x0, x21
    0x1034f4ad4 <+1388>: bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f4ad8 <+1392>: stp    xzr, xzr, [sp, #0x28]
    0x1034f4adc <+1396>: str    xzr, [sp, #0x20]
    0x1034f4ae0 <+1400>: add    x0, sp, #0x20             ; =0x20 
    0x1034f4ae4 <+1404>: add    x1, sp, #0x38             ; =0x38 
    0x1034f4ae8 <+1408>: bl     0x1034f51e4               ; void std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > >::__push_back_slow_path<rt::IntrusivePtr<sam_call> const&>(rt::IntrusivePtr<sam_call> const&)
    0x1034f4aec <+1412>: stp    xzr, xzr, [sp, #0x8]
    0x1034f4af0 <+1416>: str    xzr, [sp]
    0x1034f4af4 <+1420>: mov    w0, #0x50
    0x1034f4af8 <+1424>: bl     0x1049e4a20               ; symbol stub for: operator new(unsigned long)
    0x1034f4afc <+1428>: mov    x20, x0
    0x1034f4b00 <+1432>: adrp   x8, 6278
    0x1034f4b04 <+1436>: add    x8, x8, #0xe80            ; =0xe80 
    0x1034f4b08 <+1440>: str    x8, [x0]
    0x1034f4b0c <+1444>: adrp   x1, 6278
    0x1034f4b10 <+1448>: add    x1, x1, #0x808            ; =0x808 
    0x1034f4b14 <+1452>: mov    x2, sp
    0x1034f4b18 <+1456>: add    x3, sp, #0x20             ; =0x20 
    0x1034f4b1c <+1460>: bl     0x1034f5340               ; collection_updated_event_args<sam_call>::collection_updated_event_args(std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > > const&, std::__1::vector<rt::IntrusivePtr<sam_call>, std::__1::allocator<rt::IntrusivePtr<sam_call> > > const&)
    0x1034f4b20 <+1464>: adrp   x8, 6278
    0x1034f4b24 <+1468>: add    x8, x8, #0x7b8            ; =0x7b8 
    0x1034f4b28 <+1472>: str    x8, [x0]
    0x1034f4b2c <+1476>: ldr    x21, [sp]
    0x1034f4b30 <+1480>: cbz    x21, 0x1034f4b80          ; <+1560>
    0x1034f4b34 <+1484>: ldr    x24, [sp, #0x8]
    0x1034f4b38 <+1488>: cmp    x24, x21
    0x1034f4b3c <+1492>: b.eq   0x1034f4b74               ; <+1548>
    0x1034f4b40 <+1496>: mov    x22, x24
    0x1034f4b44 <+1500>: ldr    x8, [x22, #-0x8]!
    0x1034f4b48 <+1504>: cbz    x8, 0x1034f4b60           ; <+1528>
    0x1034f4b4c <+1508>: ldr    x9, [x8]
    0x1034f4b50 <+1512>: ldur   x9, [x9, #-0x58]
    0x1034f4b54 <+1516>: add    x0, x8, x9
    0x1034f4b58 <+1520>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4b5c <+1524>: stur   xzr, [x24, #-0x8]
    0x1034f4b60 <+1528>: mov    x24, x22
    0x1034f4b64 <+1532>: cmp    x21, x22
    0x1034f4b68 <+1536>: b.ne   0x1034f4b44               ; <+1500>
    0x1034f4b6c <+1540>: ldr    x0, [sp]
    0x1034f4b70 <+1544>: b      0x1034f4b78               ; <+1552>
    0x1034f4b74 <+1548>: mov    x0, x21
    0x1034f4b78 <+1552>: str    x21, [sp, #0x8]
    0x1034f4b7c <+1556>: bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f4b80 <+1560>: ldr    x8, [x19, #0x40]
    0x1034f4b84 <+1564>: cbz    x8, 0x1034f4b98           ; <+1584>
    0x1034f4b88 <+1568>: ldr    x0, [x19, #0x38]
    0x1034f4b8c <+1572>: mov    x1, x20
    0x1034f4b90 <+1576>: blr    x8
    0x1034f4b94 <+1580>: b      0x1034f4bd8               ; <+1648>
    0x1034f4b98 <+1584>: ldr    x0, [x23]
    0x1034f4b9c <+1588>: ldr    w8, [x0]
    0x1034f4ba0 <+1592>: cmp    w8, #0x14                 ; =0x14 
    0x1034f4ba4 <+1596>: b.gt   0x1034f4bd8               ; <+1648>
    0x1034f4ba8 <+1600>: add    x8, x19, #0x20            ; =0x20 
    0x1034f4bac <+1604>: ldrsb  w9, [x8, #0x17]
    0x1034f4bb0 <+1608>: tbz    w9, #0x1f, 0x1034f4bb8    ; <+1616>
    0x1034f4bb4 <+1612>: ldr    x8, [x8]
    0x1034f4bb8 <+1616>: mov    w9, #0x801
    0x1034f4bbc <+1620>: stp    x9, x8, [sp]
    0x1034f4bc0 <+1624>: adrp   x3, 5980
    0x1034f4bc4 <+1628>: add    x3, x3, #0x75f            ; =0x75f 
    0x1034f4bc8 <+1632>: mov    x4, sp
    0x1034f4bcc <+1636>: mov    w1, #0x2c14
    0x1034f4bd0 <+1640>: mov    w2, #0x0
    0x1034f4bd4 <+1644>: bl     0x103b01820               ; auf::LogComponent::log(unsigned int, unsigned int, char const*, auf::LogArgs const&)
    0x1034f4bd8 <+1648>: ldr    x8, [x20]
    0x1034f4bdc <+1652>: ldur   x8, [x8, #-0x58]
    0x1034f4be0 <+1656>: add    x0, x20, x8
    0x1034f4be4 <+1660>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4be8 <+1664>: ldr    x19, [sp, #0x20]
    0x1034f4bec <+1668>: cbz    x19, 0x1034f4c3c          ; <+1748>
    0x1034f4bf0 <+1672>: ldr    x21, [sp, #0x28]
    0x1034f4bf4 <+1676>: cmp    x21, x19
    0x1034f4bf8 <+1680>: b.eq   0x1034f4c30               ; <+1736>
    0x1034f4bfc <+1684>: mov    x20, x21
    0x1034f4c00 <+1688>: ldr    x8, [x20, #-0x8]!
    0x1034f4c04 <+1692>: cbz    x8, 0x1034f4c1c           ; <+1716>
    0x1034f4c08 <+1696>: ldr    x9, [x8]
    0x1034f4c0c <+1700>: ldur   x9, [x9, #-0x58]
    0x1034f4c10 <+1704>: add    x0, x8, x9
    0x1034f4c14 <+1708>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4c18 <+1712>: stur   xzr, [x21, #-0x8]
    0x1034f4c1c <+1716>: mov    x21, x20
    0x1034f4c20 <+1720>: cmp    x19, x20
    0x1034f4c24 <+1724>: b.ne   0x1034f4c00               ; <+1688>
    0x1034f4c28 <+1728>: ldr    x0, [sp, #0x20]
    0x1034f4c2c <+1732>: b      0x1034f4c34               ; <+1740>
    0x1034f4c30 <+1736>: mov    x0, x19
    0x1034f4c34 <+1740>: str    x19, [sp, #0x28]
    0x1034f4c38 <+1744>: bl     0x1049e49f0               ; symbol stub for: operator delete(void*)
    0x1034f4c3c <+1748>: ldr    x8, [sp, #0x38]
    0x1034f4c40 <+1752>: cbz    x8, 0x1034f4a00           ; <+1176>
    0x1034f4c44 <+1756>: ldr    x9, [x8]
    0x1034f4c48 <+1760>: ldur   x9, [x9, #-0x58]
    0x1034f4c4c <+1764>: add    x0, x8, x9
    0x1034f4c50 <+1768>: bl     0x103b80820               ; rt::intrusive_ptr_release(rt::IReferenceCountable const*)
    0x1034f4c54 <+1772>: str    xzr, [sp, #0x38]
    0x1034f4c58 <+1776>: b      0x1034f4a00               ; <+1176>

@devgokhan
Copy link
Author

Hi. I did some changes and then I am able to dismiss the screen. I was forgot set call.delegate = nil. After I did this problem resolved. However one time I saw app is crashed, but generally works fine.. We will understand the situation after do more tests.

func close() {
        if self.remoteParticipants.count > 0 {
            for item in self.remoteParticipants {
                item.delegate = nil
            }
        }
        self.remoteParticipants.removeAll()
        self.call?.delegate = nil
        self.timer?.invalidate()
        self.timer = nil
        self.targetRemoteParticipantView?.dispose()
        self.localVRendererView?.dispose()
        self.localRenderer?.dispose()
        self.remoteRenderer?.dispose()
        
        if let call = self.call {
            call.hangup(options: HangupOptions(), completionHandler: { (error) in
                self.dismiss()
            })
        } else {
            self.dismiss()
        }
    }

func dismiss() {
        self.userCredential = nil
        self.call = nil
        self.callAgent = nil
       
        DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
            self.dismiss(animated: true, completion: nil)
        }
    }

@sankum-msft
Copy link
Contributor

Glad to hear that you found a workaround. We have confirmed a bug with CallAgent's disposal that is causing the crash you posted. We are planning a release next week to address that bug.

@sankum-msft
Copy link
Contributor

We've released beta6 that should fix this issue.

@mariusu-msft
Copy link
Member

Closing. Please let us know if you see any more issues related to this.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working Calling Issue involves Calling functionality. iOS Issues involving the iOS SDK
Projects
None yet
Development

No branches or pull requests

4 participants