PJSIP for symbian crashed when called pjsua_destroy() ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am getting this crash on pjproject-1.7 . Earlier it was okay when using
pjproject-1.5. May be it exists on the latest release too.

2010/11/11 Bill Fans <givethemsomecolorseesee at yahoo.com.cn>

>
>
> Hi All,
>
> Have anyone solved the problem when pjsip for symbian reconnected after
> WIFI(network) is lost ?
> I coded my app by imitating symbian_ua. PJSIP's initialization was
> ok,Register was ok.
>
> If I called then talked with someone by pjsip,the pjsip crashed when  WIFI
> couldn't be used(WIFI was lost)suddenly. After the connection was lost , my
> app called  pj_symbianos_set_connection_status(PJ_FALSE) and
> pjsua_destroy().The app crashed when called pjsua_destroy().
>
> If  I didn't call then talk to someone,everything was ok when WIFI was lost
> suddenly. PJSIP could call pj_symbianos_set_connection_status(PJ_FALSE) and
> pjsua_destroy() correctly,It could unregister acount,destroy pool,shutdown
> media transports and so on.My app could reconnect WIFI and  call
> symbian_ua_init() again ,It could register correctly again..
> I have read the documentation(
> http://trac.pjsip.org/repos/wiki/Symbian_AP_Reconnection). I did implement
> the connection monitors like "connmon"" into my  application.The codes
> below:
>
> //Begin Code
> class CConnStateTimer: public CActive{
> public:
>     static CConnStateTimer* NewL()
>         {
>         CConnStateTimer *self = new (ELeave) CConnStateTimer();
>         CleanupStack::PushL(self);
>         self->ConstructL();
>         CleanupStack::Pop(self);
>         return self;
>         }
> public:
>
>     void Start()
>         {
>         Cancel(); // Cancel any request, if outstanding
>
>         iStatus = KRequestPending;
>         myWebClient->iConnection.ProgressNotification(nifProgress,iStatus);
>         SetActive();
>         }
>
>     void Stop()
>         {
>         Cancel();
>
>         }
>
>     ~CConnStateTimer()
>         {
>         Stop();
>
>         }
> private:
>     CConnStateTimer(): CActive(EPriorityHigh)
>         {
>         CActiveScheduler::Add(this);
>         }
>
>     void ConstructL()
>         {
>         }
>
>     void DoCancel()
>         {
>         myWebClient->iConnection.CancelProgressNotification();
>         }
>
>     void RunL()
>     {
>     if(nifProgress().iStage==KConnectionClosed ||
> nifProgress().iStage==KLinkLayerClosed)//Connection is lost
>         {
>
>
>         if( isSIPInitSuccess)
>             {
>             pj_symbianos_set_connection_status(PJ_FALSE);//Set Connection
> Status PJ_FALSE, PJSIP was still ok...
>             pjsua_destroy();//pjsip destroy,.Problem happened when called
> it. PJSIP crashed...
>             isSIPInitSuccess=EFalse;
>             iReInitState=EFaile;
>             isSipHasInit=EFalse;
>             if(myAppUi->IsCalling())
>                 {
>                 myAppUi->SetCallState(EFalse);
>                 if(!isWelcomeView)
>                     {
>                     switch( myDocument->GetActiveViewId())
>                         {
>                         case 0:
>                             {
>                             myContactsView->SetCBACall();
>                             }
>                             break;
>                         case 1:
>                             {
>                             myTempInputView->SetCBACall();
>                             }
>                             break;
>                         default:
>                             break;
>                         }
>                     }
>                 }
>             // Destroy pjsua
>             myWebClient->SetConnectionOpen(EFalse);
>
>             }
>
>         TBuf8<32> st_failed8;
>         st_failed8.Append(_L8("??????????"));
>         TBuf16<32> st_failed16;
>         myAppUi->ChineseConvertToUnicode(st_failed16,st_failed8);
>         myAppUi->ShowMessageByMsgBar(isWelcomeView,st_failed16);
>         isRegisterSuccess=EFalse;
>         Stop();
>         return;
>         }
>
>     Start();
>     }
>
> private:
>     TNifProgressBuf nifProgress;
> };
> //End code
> I debuged the pjsip when call pjsua_destroy(),  The debug information
> below:
>
> 1 . At View Debug window(carbide c++), the below is shown:
>
> Thread [Thread id: 1164] (Suspended: Signal 'Exception 0' received.
> Description: A data abort exception has occurred..)
>     6 tsx_destroy()
> F:\Symbian\Carbide\workspace\pjproject-1.7\pjsip\src\pjsip\sip_transaction.c:1038
> 0x792e9130
>     5 tsx_set_state()
> F:\Symbian\Carbide\workspace\pjproject-1.7\pjsip\src\pjsip\sip_transaction.c:1171
> 0x792e9518
>     4 tsx_on_state_terminated()
> F:\Symbian\Carbide\workspace\pjproject-1.7\pjsip\src\pjsip\sip_transaction.c:3149
> 0x792ecd7c
>     3 tsx_timer_callback()
> F:\Symbian\Carbide\workspace\pjproject-1.7\pjsip\src\pjsip\sip_transaction.c:1076
> 0x792e927e
>     2 CPjTimerEntry::RunL()
> F:\Symbian\Carbide\workspace\pjproject-1.7\pjlib\src\pj\timer_symbian.cpp:254
> 0x793700aa
>     1 Unknown (0x80295108)()  0x80295108
>
> 2. The app can't get out of the loop below,in tsx_destroy() .
> (F:\Symbian\Carbide\workspace\pjproject-1.7\pjsip\src\pjsip\sip_transaction.c:1038):
>
>     lck = (struct tsx_lock_data*)
> pj_thread_local_get(pjsip_tsx_lock_tls_id);
>     while (lck) {
>     if (lck->tsx == tsx) {    //After called pjsua_destroy(),my app looped
> here but not go out of while
>         lck->is_alive = 0;
>     }
>     lck = lck->prev;
>     }
>
> 3.At View Disassembly window, the below is shown:
>
>     if (lck->tsx == tsx) {
> 0x792e9126 <tsx_destroy>:     mov   r3,r7
> 0x792e9128 <tsx_destroy+2>:   sub   r3,#12
> 0x792e912a <tsx_destroy+4>:   ldr   r3,[r3,#0]
> 0x792e912c <tsx_destroy+6>:   mov   r2,r7
> 0x792e912e <tsx_destroy+8>:   sub   r2,#8
> 0x792e9130 <tsx_destroy+10>:  ldr   r1,[r3,#4]
> 0x792e9132 <tsx_destroy+12>:  ldr   r3,[r2,#0]
> 0x792e9134 <tsx_destroy+14>:  cmp   r1,r3
> 0x792e9136 <tsx_destroy+16>:  bne   tsx_destroy+0x16e (0x792e9142);
> 0x792e9142
>         lck->is_alive = 0;
> 0x792e9138 <tsx_destroy+18>:  mov   r3,r7
> 0x792e913a <tsx_destroy+20>:  sub   r3,#12
> 0x792e913c <tsx_destroy+22>:  ldr   r2,[r3,#0]
> 0x792e913e <tsx_destroy+24>:  mov   r3,#0
> 0x792e9140 <tsx_destroy+26>:  str   r3,[r2,#8]
>
>
>
> Can anyone help me with this?
>
> Best regards.
> Fans
>
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20101112/eaad7e19/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux