Problems calling "pjsip_endpt_handle_events".

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

 



Hi,

I'm implementing a softphone with PJSIP libraries for iPhone. I'm
programming in Mac OSX, with XCode.
I only use the low level libraries of PJSIP (PJSIP and PJLIB) because i use
my own media libraries (i don't use PJMEDIA).

The issue comes when i create a new thread to manage incoming messages. I
create this new thread because i need an infinite loop calling
"pjsip_endpt_handle_events" to check incoming messages, and if i don't
create a new thread, my user interface is blocked and i can't do anything
else.

Well, if i don't create this thread to manage incoming messages and i
manage them in the main thread (with the UI blocked), everything works
nicely, i can manage every message i receive. But, when i create a new
thread with "pj_thread_create" to call infinitely
"pjsip_endpt_handle_events", it only works once! I am able to manage only
the first incoming message because, when my method "on_rx_response"
returns, the program crashes and throws an exception.
Sometimes the exception is "error: address doesn't contain a section that
points to a section in a object file", sometimes is "error: memory read
failed", ...

I don't know what is happening, but it seems i'm using a null pointer or
something like that (obviously, i checked the endpoint is not a null
pointer).

What could be happening?
There is another solution to manage incoming messages without an infinite
loop calling "pjsip_endpt_handle_events"?

Thanks a lot in advance.
Jorge.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20131028/8ac57f96/attachment-0001.html>


[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