Crash in pjmedia_snd_stream_get_info

B
buldozer@aufbix.org
Mon, Feb 9, 2009 3:33 PM

Hello all,

After a long time, I upgraded the pjsip stack from 0.9x to 1.0x (latest svn as
of yesterday) and I am getting some strange crashes occasionally. I'll have to
use the debug build for a while, to get the details of the crash but for now it
seems as though 'pjmedia_snd_stream *strm' is not proper (0x0fa).

My app is pjsua_lib based, and the crash happens inside pjsua_set_ec
(SIPLocalEcho,0) which is called within the on_call_media_state callback

I'll add the important bits of my code to make things more understandable ...

void SIPCaller::on_call_media_state(pjsua_call_id call_id) {

CCErr=pjsua_call_get_info(call_id, &CMSCallInfo);
if (CMSCallInfo.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
CCErr=pjsua_conf_connect(CMSCallInfo.conf_slot, 0);
CCErr=pjsua_conf_connect(0, CMSCallInfo.conf_slot);
pjsua_set_ec (SIPLocalEcho,0);
}

}

the crash happens at (on the if statement):
if (strm->play_strm) {
paPlaySI = Pa_GetStreamInfo(strm->play_strm);
}

inside the pjmedia_snd_stream_get_info (pasound.c).

... any ideas?

Greets, Toni

Hello all, After a long time, I upgraded the pjsip stack from 0.9x to 1.0x (latest svn as of yesterday) and I am getting some strange crashes occasionally. I'll have to use the debug build for a while, to get the details of the crash but for now it seems as though 'pjmedia_snd_stream *strm' is not proper (0x0fa). My app is pjsua_lib based, and the crash happens inside pjsua_set_ec (SIPLocalEcho,0) which is called within the on_call_media_state callback I'll add the important bits of my code to make things more understandable ... void SIPCaller::on_call_media_state(pjsua_call_id call_id) { CCErr=pjsua_call_get_info(call_id, &CMSCallInfo); if (CMSCallInfo.media_status == PJSUA_CALL_MEDIA_ACTIVE) { CCErr=pjsua_conf_connect(CMSCallInfo.conf_slot, 0); CCErr=pjsua_conf_connect(0, CMSCallInfo.conf_slot); pjsua_set_ec (SIPLocalEcho,0); } } the crash happens at (on the if statement): if (strm->play_strm) { paPlaySI = Pa_GetStreamInfo(strm->play_strm); } inside the pjmedia_snd_stream_get_info (pasound.c). ... any ideas? Greets, Toni
DC
David Clark
Mon, Feb 9, 2009 8:04 PM

Don't know if it is related but I am getting intermediate crashes on
pjaus_conf_connect()...with 1.0 rc1...
I am currently trying to dig in to see what might be going on.  What
is strange is the call otherwise
seems to work.  I would expect something to be definitely broken
after a access violation.

David Clark

At 09:33 AM 2/9/2009, buldozer@aufbix.org wrote:

Hello all,

After a long time, I upgraded the pjsip stack from 0.9x to 1.0x
(latest svn as
of yesterday) and I am getting some strange crashes occasionally. I'll have to
use the debug build for a while, to get the details of the crash but
for now it
seems as though 'pjmedia_snd_stream *strm' is not proper (0x0fa).

My app is pjsua_lib based, and the crash happens inside pjsua_set_ec
(SIPLocalEcho,0) which is called within the on_call_media_state callback

I'll add the important bits of my code to make things more understandable ...

void SIPCaller::on_call_media_state(pjsua_call_id call_id) {

CCErr=pjsua_call_get_info(call_id, &CMSCallInfo);
if (CMSCallInfo.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
CCErr=pjsua_conf_connect(CMSCallInfo.conf_slot, 0);
CCErr=pjsua_conf_connect(0, CMSCallInfo.conf_slot);
pjsua_set_ec (SIPLocalEcho,0);
}

}

the crash happens at (on the if statement):
if (strm->play_strm) {
paPlaySI = Pa_GetStreamInfo(strm->play_strm);
}

inside the pjmedia_snd_stream_get_info (pasound.c).

... any ideas?

Greets, Toni


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

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

Don't know if it is related but I am getting intermediate crashes on pjaus_conf_connect()...with 1.0 rc1... I am currently trying to dig in to see what might be going on. What is strange is the call otherwise seems to work. I would expect something to be definitely broken after a access violation. David Clark At 09:33 AM 2/9/2009, buldozer@aufbix.org wrote: > Hello all, > > > After a long time, I upgraded the pjsip stack from 0.9x to 1.0x > (latest svn as >of yesterday) and I am getting some strange crashes occasionally. I'll have to >use the debug build for a while, to get the details of the crash but >for now it >seems as though 'pjmedia_snd_stream *strm' is not proper (0x0fa). > > My app is pjsua_lib based, and the crash happens inside pjsua_set_ec >(SIPLocalEcho,0) which is called within the on_call_media_state callback > >I'll add the important bits of my code to make things more understandable ... > >void SIPCaller::on_call_media_state(pjsua_call_id call_id) { > > CCErr=pjsua_call_get_info(call_id, &CMSCallInfo); > if (CMSCallInfo.media_status == PJSUA_CALL_MEDIA_ACTIVE) { > CCErr=pjsua_conf_connect(CMSCallInfo.conf_slot, 0); > CCErr=pjsua_conf_connect(0, CMSCallInfo.conf_slot); > pjsua_set_ec (SIPLocalEcho,0); > } > >} > >the crash happens at (on the if statement): > if (strm->play_strm) { > paPlaySI = Pa_GetStreamInfo(strm->play_strm); > } > >inside the pjmedia_snd_stream_get_info (pasound.c). > > > ... any ideas? > > > Greets, Toni > > >_______________________________________________ >Visit our blog: http://blog.pjsip.org > >pjsip mailing list >pjsip@lists.pjsip.org >http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
DC
David Clark
Mon, Feb 9, 2009 11:28 PM

If supported any special configuration required to enable it?

Thanks,

David Clark

If supported any special configuration required to enable it? Thanks, David Clark
GL
Gang Liu
Tue, Feb 10, 2009 10:03 AM

You can create your own SDP offer/answer for T.38 if you use pjsip-ua API.

regards,
Gang

On Tue, Feb 10, 2009 at 7:28 AM, David Clark vdc1048@tx.rr.com wrote:

If supported any special configuration required to enable it?

Thanks,

David Clark


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

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

You can create your own SDP offer/answer for T.38 if you use pjsip-ua API. regards, Gang On Tue, Feb 10, 2009 at 7:28 AM, David Clark <vdc1048@tx.rr.com> wrote: > If supported any special configuration required to enable it? > > Thanks, > > David Clark > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
B
buldozer@aufbix.org
Tue, Feb 10, 2009 2:22 PM

Heelo all,

Finally found the reason for crash - there was no sound card in the system
(actually there was, but it slipped out of the slot a bit). Maybe it would be
good, if pjmedia checked the sound devices, before trying to set the EC on
nonexistent streams.

Greets, Toni

Heelo all, Finally found the reason for crash - there was no sound card in the system (actually there was, but it slipped out of the slot a bit). Maybe it would be good, if pjmedia checked the sound devices, before trying to set the EC on nonexistent streams. Greets, Toni
NI
Nanang Izzuddin
Wed, Feb 11, 2009 11:38 AM

Hi,

Sorry, I think I couldn't get it. When there is no sound card,
pjsua_var.snd_port should be NULL (it fails on opening sound device),
and I think NULL conditions are always checked at the beginning of
functions.

Regards,
nanang

On Tue, Feb 10, 2009 at 9:22 PM,  buldozer@aufbix.org wrote:

Heelo all,

Finally found the reason for crash - there was no sound card in the system
(actually there was, but it slipped out of the slot a bit). Maybe it would
be
good, if pjmedia checked the sound devices, before trying to set the EC on
nonexistent streams.

Greets, Toni


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

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

Hi, Sorry, I think I couldn't get it. When there is no sound card, pjsua_var.snd_port should be NULL (it fails on opening sound device), and I think NULL conditions are always checked at the beginning of functions. Regards, nanang On Tue, Feb 10, 2009 at 9:22 PM, <buldozer@aufbix.org> wrote: > Heelo all, > > > Finally found the reason for crash - there was no sound card in the system > (actually there was, but it slipped out of the slot a bit). Maybe it would > be > good, if pjmedia checked the sound devices, before trying to set the EC on > nonexistent streams. > > > Greets, Toni > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >
B
buldozer@aufbix.org
Wed, Feb 11, 2009 3:18 PM

Hi Nanang,

Yes - it gets checked in the Debug builds (ASSERT), but not in the Release
builds, where the asserts are skipped (checked the disassembly).

Greets, Toni

Hi Nanang, Yes - it gets checked in the Debug builds (ASSERT), but not in the Release builds, where the asserts are skipped (checked the disassembly). Greets, Toni
BP
Benny Prijono
Thu, Feb 12, 2009 11:55 AM

On Wed, Feb 11, 2009 at 3:18 PM, buldozer@aufbix.org wrote:

Hi Nanang,

Yes - it gets checked in the Debug builds (ASSERT), but not in the Release
builds, where the asserts are skipped (checked the disassembly).

It should still check it in Release build, unless you disable it by
declaring PJ_ENABLE_EXTRA_CHECK to zero (
http://www.pjsip.org/pjlib/docs/html/group__pj__assert.htm)

Cheers
Benny

Greets, Toni

On Wed, Feb 11, 2009 at 3:18 PM, <buldozer@aufbix.org> wrote: > Hi Nanang, > > > Yes - it gets checked in the Debug builds (ASSERT), but not in the Release > builds, where the asserts are skipped (checked the disassembly). > > It should still check it in Release build, unless you disable it by declaring PJ_ENABLE_EXTRA_CHECK to zero ( http://www.pjsip.org/pjlib/docs/html/group__pj__assert.htm) Cheers Benny > > > Greets, Toni > >