Re: pjsip_endpt_unregister_module crash at pjsua_init (pjsip2.5)

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

 



Hi I found out the reason why that happened and felt embarrassed. I am sharing it in case someone else (especially for iOS development) may be interested.


So I start pjsip only when I have network connection (using Reachability). But when in an unstable network enviroment, Reachability may detect 2 different IP addresses in a short time period, they both call into ipjsua_init.


Qiulang


 Original Message 
Sender: qiulang<qiulang@xxxxxxxxxxx>
Recipient: pjsip<pjsip@xxxxxxxxxxxxxxx>
Date: Wednesday, Dec 14, 2016 14:38
Subject: [pjsip] pjsip_endpt_unregister_module crash at pjsua_init (pjsip2.5)

Hi, 

It doesn’t sound possible but I did collect more than 200 crash reports (iOS) at app start up when pjsua_init calls pjsip_endpt_unregister_module!


But how was that even possible ?!


During start-up pjsua_msg_logger.id should -1, isn’t it ?


    if (pjsua_msg_logger.id >= 0) {

pjsip_endpt_unregister_module(pjsua_var.endpt, &pjsua_msg_logger);

pjsua_msg_logger.id = -1;

    }


Any thought ? Thanks!


Qiulang


Thread 0 Crashed:
0   libsystem_kernel.dylib               0x000000018112c11c __pthread_kill + 8
1   libsystem_pthread.dylib              0x00000001811f8ef8 pthread_kill + 108
2   libsystem_c.dylib                    0x000000018109ddc8 abort + 136
3   libsystem_c.dylib                    0x0000000181072e7c __assert_rtn + 320
4   ipjsua                               0x0000000100295b18 pjsip_endpt_unregister_module (sip_endpoint.c:241)
5   ipjsua                               0x0000000100234d30 pjsua_reconfigure_logging (pjsua_core.c:675)
6   ipjsua                               0x0000000100235360 pjsua_init (pjsua_core.c:895)
7   ipjsua                               0x00000001000dc578 app_init (pjsua_app.m:5232)
8   ipjsua                               0x00000001001197ec -[My App start_pjsip] (AppDelegate.m:546)
9   libdispatch.dylib                    0x0000000180fdd4bc _dispatch_call_block_and_release + 20
10  libdispatch.dylib                    0x0000000180fdd47c _dispatch_client_callout + 12
11  libdispatch.dylib                    0x0000000180fe2b84 _dispatch_main_queue_callback_4CF + 1840
12  CoreFoundation                       0x0000000181548d50 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
13  CoreFoundation                       0x0000000181546bb8 __CFRunLoopRun + 1624
14  CoreFoundation                       0x0000000181470c50 CFRunLoopRunSpecific + 380
15  GraphicsServices                     0x0000000182d58088 GSEventRunModal + 176
16  UIKit                                0x000000018675e088 UIApplicationMain + 200
17  ipjsua                               0x0000000100296b5c main (main.m:23) 

18 ??? 0x000000018100e8b8 0x0 + 0 

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[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