Gtk, Threads and a Fatal IO error 0



Hello,

I am writing a frontend module for a program that get linked
dynamically. To be able to redraw the window even when the frontend
code is not in control, I want to use threads.

Upon initialization of the module, I create a new thread, which then
does all the gtk initilaizing, draws a window and calls gtk_main. The
other thread returns.

When my backend wants to display something, it calls a function of my
module that sets some global variable and does a cond_wait for a
signal data_ready. The global variable is checked by the gtk thread
which then does all the gtk stuff.

All gtk calls are made from that gtk thread, the other just uses
signals to communicate with it.

When I launch my program, everything works fine, until I cause some
gtk events, like entering text into an entry, move with the mouse over
button etc. After a time, dependand apparently on the frequency
signals are emitted, my program dies with:

cdebconf: Fatal IO error 0 (Success) on X server :0.0.

I have no idea what can be the cause of this, neither do I know how to
debug it.

Any help is greatly appreciated, thanks in advance,
Sebatian Ley

-- 
PGP-Key: http://www.mmweg.rwth-aachen.de/~sebastian.ley/public.key
Fingerprint: A46A 753F AEDC 2C01 BE6E  F6DB 97E0 3309 9FD6 E3E6



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