Hi Yosi, For first be careful with this: if (!acc_cfg.reg_uri.slen) { return; //<-- its will not free pool } and for second build pjsip in debug mode and try to debug this part of code. Best Regards, R. Savchenko. 2013/8/8 Yosi Taguri <yosi at taguri.com> > I see a strange crash sometimes on pj_pool_create. > Here is my keep alive function that is getting called each the app goes to > the bakcground and comes back to the foreground so I can update the keep > alive setting: > > what could trigger such a crash? > > void keepAliveFunction(int timeout) > { > LGCLOG(LGFLAG_SIP_HANDLER, @"in keepAliveFunction"); > if (![SipHandlerListener instance]) { > LGCLOG(LGFLAG_SIP_HANDLER, @"*******sip handler instance is > dead....******"); > } > pj_pool_t *pool = pjsua_pool_create("keepAliveFunction", 1024, 1024); > > for (int i = 0; i < (int)pjsua_acc_get_count(); ++i) { > if (pjsua_acc_is_valid(i)) { > pjsua_acc_config acc_cfg; > pj_status_t aliveStatus; > pjsua_acc_get_config(i, pool, &acc_cfg); > if (!acc_cfg.reg_uri.slen) { > return; > } > if (acc_cfg.reg_timeout != timeout) { > acc_cfg.reg_timeout = timeout; > aliveStatus = pjsua_acc_modify(i, &acc_cfg); > LGCLOG(LGFLAG_SIP_HANDLER, @"in keepAliveFunction: account > id:%d pjsua_acc_modify returned %d",i , aliveStatus); > } else { > aliveStatus = pjsua_acc_set_registration(i, PJ_TRUE); > LGCLOG(LGFLAG_SIP_HANDLER, @"in keepAliveFunction: account > id:%d pjsua_acc_set_registration returned %d",i , aliveStatus); > } > } > } > pj_pool_release(pool); > } > > here is the crash log: > > Exception Type: SIGSEGV Code: SEGV_ACCERR at 0x0 > 15 Threads > com.apple.main-thread Crashed > 0 > 1 Yalo pj_pool_create + 20 > 2 Yalo pjsua_pool_create + 36 > 3 Yalo > AppDelegate.mm line 692 > keepAliveFunction(int) > > > _______________________________________________ > 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/20130808/110b9448/attachment-0001.html>