stream port destroyed before callback function was called

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

 



On 2/14/08, Truong Thanh Quang <quangtt at softend.vn> wrote:
>
>  Hi Benny,
>
>  I wrote a small app as Q&A from
> http://trac.pjsip.org/repos/wiki/FAQ#pjsua-lib-perf
>  Holding function will be handle in on_call_media_state callback function,
> (call_info.media_status == PJSUA_CALL_MEDIA_REMOTE_HOLD) to remove stream
> port from conference.
>  When call was re-INVITE (call_info.media_status == PJSUA_CALL_MEDIA_ACTIVE)
> stream port will be added to conference again:
>      pjmedia_session_get_port(call->session, 0, &stream);
>      pjmedia_conf_add_port(cd->conf, cd->pool, stream, NULL,
> &cd->call_slot);
>  Result: Sometime, app crash.
>  Call stack as follow:
>  feeefeee()
>  pjmedia_port_get_frame(pjmedia_port * 0x05111a74,
> pjmedia_frame * 0x04c9fd1c) line 67 + 16 bytes
>  read_port(pjmedia_conf * 0x01258d4c, conf_port * 0x0126b214, short *
> 0x01269334, unsigned int 0x000000a0, int * 0x04c9fddc) line 1288 + 16 bytes
>  get_frame(pjmedia_port * 0x01258dfc, pjmedia_frame * 0x04c9fec8) line 1703
> + 31 bytes
>  pjmedia_port_get_frame(pjmedia_port * 0x01258dfc,
> pjmedia_frame * 0x04c9fec8) line 67 + 16 bytes
>  clock_callback(const pj_timestamp * 0x012694e0, void * 0x01269218) line 173
> + 16 bytes
>  clock_thread(void * 0x012694c8) line 243 + 22 bytes
>  thread_main(void * 0x01269510) line 334 + 15 bytes
>  KERNEL32! 7c80b713()
>
>  I think stream was destroy before callback function as called
>

Did you destroy the stream when the call is put on hold? If yes, then
it needs to be re-created before you put it back in the bridge. Also
even if the stream was not destroyed, make sure that the pool that
stream was allocated from is not destroyed when the call was put on
hold, otherwise the stream will contain dangling pointers.

cheers,
 -benny

>  Help me how to handle this case?
>  Thanks,
>  -quang



[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