[pjsip] PJSIP + GTK and segfault
r3gis.3r at gmail.com
Thu Jun 7 00:54:53 EDT 2012
I'm not a gtk expert but your problem is probably the very common one of
running UI library stuff in the UI thread that occurs in many UI library on
You should Googling about gtk and running UI modifications in UI/main
As an example of result :
I think that the problem is not pjsua but linked to the fact you don't use
gtk correctly regarding threads.
Your workaround with timer probably works because gtk timers are executed
in main thread but I guess that there is a dedicated clean way to push
something in the main loop in gtk ;)
Hope it helps to understand the root cause of the problem.
Le 7 juin 2012 02:14, "Gabriel Ortiz Lour" <ortiz.admin at gmail.com> a
> for the record...
> Well, not quite beautiful but I solved changing the " gtk_widget_show_all"
> func call to:
> g_timeout_add(150, showDialog, NULL);
> and added a new func "showDialog" with the call to "gtk_widget_show_all"
> this way it works...
> 2012/6/6 Gabriel Ortiz Lour <ortiz.admin at gmail.com>
>> Hi all,
>> I'm making an GTK+ simple UA with pjsua.
>> I know that this is not the best place to ask this question, as it
>> appears to be an GTK issue and not PJSIP one, but I can't find help out
>> I have a call to "gtk_widget_show_all" inside the "on_incoming_call"
>> callback that segfaults.
>> I have the same call in other part of my app (on mouse click event)
>> that show the desired dialog just fine.
>> The debbuger point to some function inside the GTK lib
>> (gdk_window_set_geometry_hints ...), info that doesn't help much.
>> If someone have any pointers i'd appreciate.
>> // GTK
>> GtkWidget *answerDialog; // Initialized OK at the beggining of the code,
>> show up OK on mouse clicks
>> /* Callback called by the library upon receiving incoming call */
>> static void on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
>> pjsip_rx_data *rdata)
>> gtk_widget_show_all(answerDialog); // SEGFAULT here
> Visit our blog: http://blog.pjsip.org
> pjsip mailing list
> pjsip at lists.pjsip.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pjsip