Re: gdk_threads_leave is possible to cause segmentation fault?



But  now this functions aren't running. This is my main thread
void *vGtkMain_Thread(gpointer data)
{
    gdk_threads_enter();
    gtk_main();
    gdk_threads_leave();
    return NULL;
}


You should remove everywhere in your code gtk_threads_ calls.

You cannot call gtk_label_get_text from a thread different from the gtk
main loop one, get the result of the call and pass it to the thread
function as parameter.

You should take care that the functions you call with g_idle_add() return
FALSE otherwise they will be called every time the main loop is idle using
100% of CPU (this can be a desired behaviour in some circumstances).

You should also take care that the global data you access in
iUpdateConfigNow, gbUpdateStatusNow... is not changed while you are
updating the GUI


-- 
*Bye,*
* Gabry*


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