Thanks, but I am afraid this is not the reason that crashed my app(if it was it should crash the app every time!) And if you check the code pjsua_acc_set_registration is called by pjsua_acc_add when app is started. So I have no idea which part went wrong. Qiulang On 13-11-25 ??8:03, David Fu wrote: > I afraid you should made the thread call pjsua_acc_set_registration() > registered in pjsip. > > did you miss the following code to make sure the thread is safe to pjsip? > > if (!pj_thread_is_registered){ > pj_thread_register(X, X, X); > } > > On Nov 25, 2013, at 15:12, qiulang <qiulang at sinicnet.com.cn > <mailto:qiulang at sinicnet.com.cn>> wrote: > >> Hi, >> >> I find pjsua_acc_set_registration crashed my app (based on pjsip2.1) >> from time to time in iOS (I modified the ipjsua sample project). Of >> course it won't crash every time, below are crash logs I collected, >> >> For iOS 7: >> >> Thread 0 Crashed: >> 0 libsystem_kernel.dylib 0x3a82a1fc ___pthread_kill + 8 >> 1 libsystem_c.dylib 0x3a7db02d _abort + 77 >> 2 libsystem_c.dylib 0x3a7bac6b ___assert_rtn + 183 >> 3 ipjsua 0x00156973 pjsua_acc_set_registration + 1591 >> ... >> 23 UIKit 0x327671e5 _UIApplicationMain + 1137 >> 24 ipjsua 0x000088e3 main (main.m:23) >> >> >> For iOS 6: >> >> Thread 0 Crashed: >> 0 libsystem_kernel.dylib 0x3bd7a350 ___pthread_kill + 8 >> 1 libsystem_c.dylib 0x3bd2d973 _abort + 95 >> 2 libsystem_c.dylib 0x3bd0e4d1 _basename + 1 >> 3 ipjsua 0x00222973 pjsua_acc_set_registration + 1591 >> ... >> 23 UIKit 0x3a6f4291 _UIApplicationMain + 1121 >> 24 ipjsua 0x000f48e3 main (main.m:23) >> >> >> For iOS 5: >> >> Thread 0 Crashed: >> 0 libsystem_kernel.dylib 0x3052d32c ___pthread_kill + 8 >> 1 libsystem_c.dylib 0x31b40feb _abort + 95 >> 2 libsystem_c.dylib 0x31b580dd __asl_escape + 1 >> 3 ipjsua 0x0015d973 pjsua_acc_set_registration + 1591 >> ... >> >> They all happened at the address offset 1591, which I have no idea >> where that could be. I checked the code, I do not think it was first >> two PJ_ASSERT_RETURN. >> So any idea where the assert would happen ? >> >> Thanks a lot. >> >> Qiulang >> _______________________________________________ >> Visit our blog: http://blog.pjsip.org >> >> pjsip mailing list >> pjsip at lists.pjsip.org <mailto:pjsip at lists.pjsip.org> >> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > _______________________________________________ > 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/20131125/616d096e/attachment-0001.html>