GTK, threads and accessibility - application hangs


I would like to know if it's forbidden by design to run gtk_main() in 
a thread other the "main" one or the one where gtk_init() was called.

My GTK applications hang when accessibility is enabled and gtk_main() is 
outside the "main" thread.

This problem started as a PyGTK issue, but after some tests it occurred 
that it could as well be a general GTK question.

I couldn't find the answer in the documentation.

Discussions I've found using Google and searching through this archive 
didn't give me an answer. Sometimes the code was a part of a bigger 
project and it dragged a thread from the main question. So I've created 
a couple of snippets of code using GTK and threads. Code is in 
a repo[1].

This is the summary:
                                         |   hang   |
python/          |   no     |
python/           |   no     |
python/ |   no !   |
python/        |   yes    |
python/  |   no !   |
python/         |   yes    |
python/        |   no     |
cpp/primarythread.cpp                    |   no     |
cpp/secondarythread.cpp                  |   yes    |
cpp/secondarythread_init.cpp             |   no !   |

!   ** ( CRITICAL **:
giop_thread_request_push: assertion `tdata != NULL' failed
  -- at the application termination

I would like to know if "secondarythread" variants are correct or did 
I violate some GTK rules.

Both for Python and C++ secondarythread variants seem to hang when using
/usr/lib/ Only in this variant link_set_io_thread() 
inside giop_thread_new_check() is called, which leads to executing 
g_main_loop_run(). Backtrace available in the repo. Is there a bug in 

There was some discussion at StackOverflow[2] and I've asked the 
question on the PyGTK mailing list[3] but got no answer.


Marcin Szewczyk             
mailto:Marcin Szewczyk wodny borg  <- remove b / usuń b
xmpp:wodny ubuntu pl                  xmpp:wodny jabster pl

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