Re: GtkTextBuffer crashes

2007-10-15 Thread Michael Lamothe
In short, I think that's it much better if you don't make GTK calls from the second thread, it's a sure-fire way to avoid multi-threading UI issues. But, all you need to do is, 1. wrap gtk_main(), ie., g_thread_init (NULL); // Add this line gdk_threads_init (); // Add this line gdk_thr

Re: GtkTextBuffer crashes

2007-10-15 Thread Michael Lamothe
Hi AlannY, I'm new to this mail thread but I think that I know what your issue is. Basically, GTK/GDK is not designed to be called from multiple at the same time. Doing so causes all kinds of strange issues such as the ones that you are seeing. There are many ways to get around this issue but r

Re: GtkTextBuffer crashes

2007-10-15 Thread AlannY
AlannY wrote: > Hi there. > > I have trouble in my program. > > First of all, I'm using latest GTK and got many assertion in console > when using GtkTextBuffer. > > Second. I have 2 threads. First one is a gtk_main_loop. Second one is my > (pthread) thread. In second thread I'm trying to set thi

GtkTextBuffer crashes

2007-10-15 Thread AlannY
Hi there. I have trouble in my program. First of all, I'm using latest GTK and got many assertion in console when using GtkTextBuffer. Second. I have 2 threads. First one is a gtk_main_loop. Second one is my (pthread) thread. In second thread I'm trying to set this: gtk_text_buffer_set_text(win