Re: Xlib: unexpected async reply (sequence #####)!

2007-08-08 Thread Gabriel Schulhof
On Sun, 2007-08-05 at 20:11 +0800, Gregory Hosler wrote: > Your example clears up alot of stuff for me. One of my questions (that your > example pretty much clarifies for me), was "what do I g_idle_add()" ? > If I understand correctly, you basically add callback functions, and in > particular, ones

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-06 Thread Andrew Cowie
On Sat, 2007-08-04 at 22:07 +0800, Gregory Hosler wrote: > That threads_enter/threads_leave doesn't look so bad, since I'm not > doing a lot of gtk withing my thread. Looks like it might be the way > to go for me. Beware that you need to ensure that you call gdk_threads_enter() before calling gtk_

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-05 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gabriel Schulhof wrote: > On Sun, 2007-08-05 at 11:29 +0800, Gregory Hosler wrote: >> I'm looking for code examples specifically on how to use/implement >> g_idle_add(). >> Know any projects that uses g_idle_add() and related infrastructure? > > > s

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-05 Thread Chris Vine
On Sun, 2007-08-05 at 11:24 +0800, Gregory Hosler wrote: > The main loop is already protected (by threads_enter()/threads_leave() so I > didn't need to add any code at all to the main code (and I don't have any > timeout callbacks either), so the only places I needed to add the > threads_enter/lea

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-05 Thread Gabriel Schulhof
On Sun, 2007-08-05 at 11:29 +0800, Gregory Hosler wrote: > I'm looking for code examples specifically on how to use/implement > g_idle_add(). > Know any projects that uses g_idle_add() and related infrastructure? static gboolean make_insensitive_idle_cb(gpointer data) { GtkWidget *widget = GTK

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brian J. Tarricone wrote: > On Sat, 04 Aug 2007 22:50:06 +0100 Chris Vine wrote: > >> On Sat, 2007-08-04 at 22:07 +0800, Gregory Hosler wrote: >>> That threads_enter/threads_leave doesn't look so bad, since I'm not >>> doing alot of gtk withing my thr

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris Vine wrote: > On Sat, 2007-08-04 at 22:07 +0800, Gregory Hosler wrote: >> That threads_enter/threads_leave doesn't look so bad, since I'm not doing >> alot >> of gtk withing my thread. Looks like it might be the way to go for me. > > You may be

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Brian J. Tarricone
On Sat, 04 Aug 2007 22:50:06 +0100 Chris Vine wrote: > On Sat, 2007-08-04 at 22:07 +0800, Gregory Hosler wrote: > > That threads_enter/threads_leave doesn't look so bad, since I'm not > > doing alot of gtk withing my thread. Looks like it might be the way > > to go for me. > > You may be missing

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Chris Vine
On Sat, 2007-08-04 at 22:07 +0800, Gregory Hosler wrote: > That threads_enter/threads_leave doesn't look so bad, since I'm not doing alot > of gtk withing my thread. Looks like it might be the way to go for me. You may be missing the point. If you access GTK+ from more than one thread, then all o

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Gregory Hosler
as >> expected. >> Occassionally I will get the message on stdout >> >> Xlib: unexpected async reply (sequence #)! >> >> the ### is an x event sequence number >> >> I am suspecting that this is because of the x calls from 2 different threads

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Gregory Hosler
as >> expected. >> Occassionally I will get the message on stdout >> >> Xlib: unexpected async reply (sequence #)! >> >> the ### is an x event sequence number >> >> I am suspecting that this is because of the x calls from 2 different threads

Re: Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Yeti
On Sat, Aug 04, 2007 at 09:38:25PM +0800, Gregory Hosler wrote: > I have a threaded gtk application. The threads create some gui (gtk > widgets/windows). and most of the time (maybe 80%) everything works as > expected. > Occassionally I will get the message on stdout > >

Xlib: unexpected async reply (sequence #####)!

2007-08-04 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have a threaded gtk application. The threads create some gui (gtk widgets/windows). and most of the time (maybe 80%) everything works as expected. Occassionally I will get the message on stdout Xlib: unexpected async reply

Xlib: unexpected async reply

2006-04-16 Thread Fernando Apesteguía
I think it's better you put some pieces of code so more people can help you. I'm not an expert, but basically, you should block other threads when you want to access GtkWidgets, e.g. gdk_threads_enter() gtk_label_set_text(my_label,"my_text"); gdk_threads_leave() And try to return to GTK as so

Xlib: unexpected async reply

2006-04-15 Thread Fernando Apesteguía
Hi, it's me again... now a bit embarrassed I found the problem after more and more debugging. The read_data_from_file() function was a function with variable number of parameters implemented with va_list... Due to a stupid mistake this function did not return when a certain number of parameter

Xlib: unexpected async reply

2006-04-15 Thread Fernando Apesteguía
Hi list! I get this error when runing my GTK application: Xlib: unexpected async reply (sequence 0xdfd)! (Te sequence number varies.) A little explanation about the application: It runs two threads. One of them is runing inside the gtk_main() loop. The other one, periodically reads from

Re: Xlib: unexpected async reply

2005-04-26 Thread Zeeshan Ali
Hello, On 4/27/05, Mishael A Sibiryakov <[EMAIL PROTECTED]> wrote: > Hi. > > I have a multi-threaded application and sometimes i have to receive this > message: Xlib: unexpected async reply (sequence 0x46dea)! > > I try to search in google but is says that is threads p

Xlib: unexpected async reply

2005-04-26 Thread Mishael A Sibiryakov
Hi. I have a multi-threaded application and sometimes i have to receive this message: Xlib: unexpected async reply (sequence 0x46dea)! I try to search in google but is says that is threads problem. Please tell me what caused this problem and how i can resolve it ? PS: I don't use g_* threa