Re: Xlib-error in threaded GTK+

Owen Taylor <> writes:

> > > I have had this problem aswell.
> > > A second thread is writing to some shared memory that
> > > the X thread reads.
> > 
> > Well, it's not shm-memory in my case, but they do share memory areas,
> > which has been allocated with malloc (not g_malloc).
> This can't cause this sort of problem - an error like this almost
> certainly indicates that you are making X calls from the second 
> thread - probably there is some code path that you aren't
> expecting which does it.

Oh, shit, that's right.. a small little thing, I just came to think

So, how do I avoid the error? Do I put another pair of
gdk_threads_enter/gdk_threads_leave around the GTK+ calls in the
second thread?


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