GTK bug? xcb_io.c: 140

Hi all,

Trying to get my application ready for distribution.
All looking good until I started getting this error and program termination:

My-Program: xcb_io.c:140 dequeue_pending_request: Assertion `req == dpy->xcb->pending_requests` failed

Has anyone come accross this? I am working in Fedora 14 with the GTK libraries. I beliieve that this could be a GTK bug of some kind. I can't chaulk it up to my own code as it is completely random when it occurs.

Thanks in advance for any help

Googling this error, it appears to be related to OpenGL and multithreading. What graphics engine do you use?

i am using: ATI Tecnologies Inc RS880 [Radeon HD 4250]

I meant, software. What is your program? What libraries does it use?

I use GTK for all screen drawing and window managing

Is your program multi-threaded? This error's hard to pin down, but you're not the only one who gets it. It seems related to making graphical calls in more than one thread. Putting all graphical calls in one thread (including graphical initialization) helps at least some.

ya that is kind of what I have been seeing as well. it is multi-threaded yes. i have some zooming buttons in my program that modify several global variables used to set up metre to pixel scaling which are units passed to gtk. so i have been noticing that modifying these variables too quickly is crashing the application. probably due to the GTK thread not being finished.....

You should always use a mutex for global variables when dealing with multiple threads. This is particularly important on multicore systems -- the mutex doesn't just prevent race conditions, it forces two cores to sync their memory (one core could change the memory, and the other core might not know, old memory in cache, until the mutex forces it to sync).