Assertion Failed error in pjusa_make_call on Tcp transport while sccuessfully Registered with TCP(iOS using siphone)

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

 



https://trac.pjsip.org/repos/wiki/FAQ#assert

Quote:

It's an assertion, and not a crash
Very often we received a report that PJSIP crashes, while actually it's just an assertion. This makes a big difference for us in terms of troubleshooting, since a crash means fatal bug, while an assertion just serves as a warning thus it is not as fatal. 
In PJSIP, we use assertion as means to warn developers that something unexpected has happened. This may be due to some wrong assumption being made during development, some invalid values being used, or some other mistakes done by the developer. The developer can be you or me of course. The conventions that we use consistently are: 
assertion should only be raised for unexpected errors generated locally. For errors coming from external sources (such as a malformed SIP message received from remote), it must not raise assertion, and rather a usual error handling must be performed. 
assertion must not replace a proper error handling, thus when assertion is disabled, the program should fallback to using error handling as usual. 
We use PJ_ASSERT_RETURN() macro a lot. The idea of this macro is to raise an assertion during development so that any problems can be found and fixed early, and on the production release where the assertion is disabled, the macro will revert to error handling so that the application will not terminate unexpectedly with Assertion failure error. 
So yes, you should disable assertion on the release version of the software. This is another convention that we use. 




Hoppie (who did not write the above)

-----Original Message-----
From: pjsip [mailto:pjsip-bounces@xxxxxxxxxxxxxxx] On Behalf Of Ashish Gour
Sent: Wednesday, October 15, 2014 8:05 AM
To: pjsip at lists.pjsip.org
Subject: Re: Assertion Failed error in pjusa_make_call on Tcp transport while sccuessfully Registered with TCP(iOS using siphone)

Jeroen Hoppenbrouwers <jHoppenbrouwers <at> avionica.com> writes:

> Hello Sir,
Thanks for reply. Actually i am not able to find this debug assertion in pjsip. Would you please tell me where actually it is in pjsip as it is not available in os_core_unix.c. Once it would be find i will disable it.
> 
> 
> Ashish,
> ?
> You're not making a mistake.? pjsip contains by default assertions 
> that
warn the developer that something is amiss deep inside the library itself.
In theory this should not
>  happen, but pjsip library bugs are a reality. Your production build
should not have these assertions enabled so it won't trigger anything.? If it works, ok, but please report the library bug.
> ?
> Look for the "debug assertion" option and disable it, it is a #define 
> if I
remember well.
> ?
> ?
> Hoppie
> ?
> From: pjsip [mailto:pjsip-bounces <at> lists.pjsip.org] On Behalf Of 
> Ashish GourSent: Tuesday, October 14, 2014 12:16 PMTo: pjsip
<at> lists.pjsip.orgSubject: Assertion Failed error in pjusa_make_call on Tcp transport while sccuessfully Registered with TCP(iOS using siphone)
> ?
> 
> 
> 
> Hello All,
> 
> I am using siphon for ios? 6.0 and later. In this I have added tcp
transport? and I am registered. Now when I call a cellular number (PSTN No) I am getting this error at pjusa_make_call:
> Assertion failed: (mutex), function pj_mutex_lock, file
../src/pj/os_core_unix.c, line 1201.
> 
> 
> But its working fine with UDP trasnport.
> 
> 
> 
> So please suggest me where i am mistaken?
> 
> 
> Thanks and regards
> 
> 
> Ashish Gour
> 
> 
> 
> 
> 
> <div>
> <div class="WordSection1">
> <p class="MsoNormal"><span>Ashish,<p></p></span></p>
> <p class="MsoNormal"><span><p>&nbsp;</p></span></p>
> <p class="MsoNormal"><span>You're not making a mistake.&nbsp; pjsip
contains by default assertions that warn the developer that something is amiss deep inside the library itself. In theory this should not
>  happen, but pjsip library bugs are a reality. Your production build
should not have these assertions enabled so it won't trigger anything.&nbsp; If it works, ok, but please report the library bug.<p></p></span></p>
> <p class="MsoNormal"><span><p>&nbsp;</p></span></p>
> <p class="MsoNormal"><span>Look for the "debug assertion" option and
disable it, it is a #define if I remember well.<p></p></span></p>
> <p class="MsoNormal"><span><p>&nbsp;</p></span></p>
> <p class="MsoNormal"><span><p>&nbsp;</p></span></p>
> <p class="MsoNormal"><span>Hoppie<p></p></span></p>
> <p class="MsoNormal"><span><p>&nbsp;</p></span></p>
> <p class="MsoNormal"><span>From:</span><span> pjsip 
> [mailto:pjsip-bounces
<at> lists.pjsip.org]
> On Behalf Of Ashish Gour<br>Sent: Tuesday, October 14, 2014 12:16
PM<br>To: pjsip <at> lists.pjsip.org<br>Subject: Assertion Failed error in pjusa_make_call on Tcp transport while sccuessfully Registered with TCP(iOS using siphone)<p></p></span></p>
> <p class="MsoNormal"><p>&nbsp;</p></p>
> <div>
> <div>
> <div>
> <p class="MsoNormal">Hello All,<p></p></p> </div> <p 
> class="MsoNormal">I am using siphon for ios&nbsp; 6.0 and later. In
this I have added tcp transport&nbsp; and I am registered. Now when I call a cellular number (PSTN No) I am getting this error at pjusa_make_call:<br><br>
> Assertion failed: (mutex), function pj_mutex_lock, file
../src/pj/os_core_unix.c, line 1201.<p></p></p>
> </div>
> <div>
> <p class="MsoNormal">But its working fine with UDP trasnport.
> <p></p></p>
> </div>
> <div>
> <p class="MsoNormal">So please suggest me where i am 
> mistaken?<p></p></p> </div> <div> <p class="MsoNormal">Thanks and 
> regards<p></p></p> </div> <div> <p class="MsoNormal">Ashish 
> Gour<p></p></p> </div> </div> </div> </div>
> 





_______________________________________________
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


[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