>From my debug information all around my softphone, ph_call_media_stop is called only once (it could be it is called internally more than once). But asuming it is called twice, how can I avoid this? Using a critical section maybe? Do you think 2 different threads are executing this function, so it crashes (because there is a check:   if (ca->mses)... but still ca->mses is NULL when it crashes).

10x

On 5/23/06, Jérôme WAGNER <[EMAIL PROTECTED]> wrote:

Hello,

 

One way to explain this kind of behaviour would be that ph_call_media_stop is called 2 times very quickly.

 

phapi is not totally safe on this point and I have already seen problems around such "2 API calls in a row".

 

Can you add printf in your code, or activate the SIP part of phdebug.h to see if indeed your call is closed 2 times when the bug arises ?

 

Thank you,

Jérôme

 


De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] De la part de Cantemir Mihu
Envoyé : mardi 23 mai 2006 13:35
À : wengo dev
Objet : [Wengophone-devel] Crashing because of phapi.dll

 

Hello,

my softphone based on phapi, running on Windows does crash from time to time. Therefore, I included a crash report generator, that generates so called minidumps. With this dumps and the phapi source code, I am able to track the exact line of crash. I found out three such lines:

1. in rtpmod.c, function void rtp_putq(queue_t *q, mblk_t *mp)
the line:
if (rtp->timestamp == tmprtp->timestamp)
causes ACCESS_VIOLATION, because the rtp variable is 0x0000000C

2. in phapi.c , function ph_call_media_stop(phcall_t *ca)
the line:
g_mutex_free(ca->mses->critsec

_mstream_init);
causes ACCESS_VIOLATION, because the ca-mses member is NULL, allthough there is a check if (ca->mses) ???

3. in rtpsession.c, function rtp_session_create_packet (RtpSession * session, gint header_size, char *payload, gint payload_size)
the line:
rtp->version = 2;
causes ACCESS_VIOLATION, because the rtp variable is NULL!

I cand send you the *.pdb files, if you need them and any other info. If you have time, please tell me what could be the problem of this errors and how I can avoid them. I tried using __try... __finally on error number 2 (which is the most often), but without any success. How can I implement a exception catcher in phapi.dll, so the program does not crash, but is able to reinitiate phapi if necessary.

Thank you for your patient in reading this.



--
----
Best regards / Mit freundlichen Grüssen
Cantemir Mihu




--
----
Best regards / Mit freundlichen Grüssen
Cantemir Mihu
_______________________________________________
Wengophone-devel mailing list
Wengophone-devel@lists.openwengo.com
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to