Benny Prijono wrote: > On Fri, Aug 8, 2008 at 7:33 PM, Pedro Gon?alves > <pedro.pandre at gmail.com <mailto:pedro.pandre at gmail.com>> wrote: > > > > > How can you print the tdata and check->tdata in > > pj_stun_session_on_rx_pkt()? Where did you get the pointers from? > I had some work tracing back the variables, but here is how I am > gettting them: > > > Okay, I don't know about that (haven't read them, sorry). > > But can you add these snippet just before the assert, and try again, > and send back the log? > > PJ_LOG(3,("", "on_stun_request_complete")); > PJ_LOG(3,("", " stun_sess=%p, status=%d" > " tdata=%p, check->tdata=%p" > , stun_sess, status, tdata, check->tdata)); > > if (tdata != check->tdata) { > char dump[1024]; > > PJ_LOG(3,("", "Gotcha!")); > PJ_LOG(3,("", " src_addr=%s", > pj_sockaddr_print(src_addr, dump, sizeof(dump),3))); > PJ_LOG(3,("", " tdata message: ")); > if (tdata && tdata->msg) { > pj_stun_msg_dump(tdata->msg, dump, sizeof(dump), NULL); > PJ_LOG(3,("", "%s", dump)); > } > PJ_LOG(3,("", " check->tdata message: ")); > if (check->tdata && check->tdata->msg) { > pj_stun_msg_dump(check->tdata->msg, dump, sizeof(dump), NULL); > PJ_LOG(3,("", "%s", dump)); > } > PJ_LOG(3,("", " response: ")); > if (response) { > pj_stun_msg_dump(response, dump, sizeof(dump), NULL); > PJ_LOG(3,("", "%s", dump)); > } > PJ_LOG(3,("", " Dude, you're gonna crash!")); > pj_thread_sleep(1000); > } > > Cheers > Benny The application just crashed in the assert. You can find the log and capture in attachment. However, I think that the part you want is this one: 10:39:38.542 on_stun_request_complete 10:39:38.572 Master/sound 495 samples reduced, buf_cnt=1741 10:39:38.583 stun_sess=10E6683C, status=0 tdata=10B1EC5C, check->tdata=11226C5C 10:39:38.617 Master/sound 363 samples reduced, buf_cnt=1778 10:39:38.626 Gotcha! 10:39:38.658 Master/sound Buffer size adjusted from 2141 to 1778 (eff_cnt=1500) 10:39:38.681 src_addr=172.18.0.133:1101 10:39:38.719 aec118B6E80 AEC reset, delay=-22, prefetch=4 10:39:38.720 Master/sound 516 samples reduced, buf_cnt=1662 10:39:38.730 Master/sound Buffer size adjusted from 2178 to 1662 (eff_cnt=1500) 10:39:38.730 tdata message: 10:39:38.759 STUN Binding request Hdr: length=76, magic=2112a442, tsx_id=00001da869525f902cd672ae Attributes: PRIORITY: length=4, value=31 (0x1f) ICE-CONTROLLED: length=8, data=2213260d6b89030a USERNAME: length=17, value="39b32d12:301c0bdb" MESSAGE-INTEGRITY: length=20, data=21ab25183e944e36b9ce8f67137171f5d34afc6f FINGERPRINT: length=4, value=882043185 (0x3492e931) 10:39:38.789 aec118B6E80 AEC reset, delay=-23, prefetch=4 10:39:38.830 check->tdata message: 10:39:38.871 aec118B6E80 AEC Info: prefetching (first seq=47) 10:39:38.907 STUN Binding request Hdr: length=76, magic=2112a442, tsx_id=00001da80120759a2cd672af Attributes: PRIORITY: length=4, value=31 (0x1f) ICE-CONTROLLED: length=8, data=2213260d6b89030a USERNAME: length=17, value="39b32d12:301c0bdb" MESSAGE-INTEGRITY: length=20, data=9218d4e434f29180dc45f13920fc38b54346235d FINGERPRINT: length=4, value=675062741 (0x283ca3d5) 10:39:38.938 Master/sound 308 samples reduced, buf_cnt=1754 10:39:38.965 response: 10:39:39.030 STUN Binding success response Hdr: length=68, magic=2112a442, tsx_id=00001da869525f902cd672ae Attributes: XOR-MAPPED-ADDRESS: length=8, IPv4 addr=172.18.0.130:60063 SERVER: length=19, value="pj_stun-0.9.0-trunk" MESSAGE-INTEGRITY: length=20, data=fd891d6775443a3d047326661774f8a3831ae4ff FINGERPRINT: length=4, value=2604254626 (0x9b39c5a2) 10:39:38.998 Master/sound 502 samples reduced, buf_cnt=1652 10:39:39.050 aec118B6E80 AEC Info: prefetching (first seq=47) 10:39:39.031 Master/sound Buffer size adjusted from 2154 to 1652 (eff_cnt=1500) 10:39:39.061 Dude, you're gonna crash! If what you wanted to see was if tdata->msg was equal to check->tdata->msg, they don't seem to be. Furthermore, as I said in a previous email, tdata->next is equal to check->tdata->prev. I don't know what this means neither do I know if it is somehow related to this issue. Cheers Pedro Gon?alves -------------- next part -------------- A non-text attachment was scrubbed... Name: tdata_assert_error.pcap Type: application/octet-stream Size: 16782 bytes Desc: not available Url : http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080811/40fffe1f/attachment-0001.obj -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: tdata_assert_error.log Url: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080811/40fffe1f/attachment-0001.pl