XInitThreads and GTK problem (text entry) again



Hi Folks,

I'm running Gtk 1.2.10 under X 4.2.1.1 and am having some problems. Here's some background:

1.  I've got an app that draws widgets to a Gnome Canvas.  Works nicely.
2. I've got a new "widget/object" that reads incoming video with V4L. I needed to put this widget inside it's own thread. I had a hell of a time getting it to work until I called XInitThreads() at the very start of my app. So now things seem to work fine. I tried using g_thread_init() and gdk_thread_enter/leave() but they just didn't seem to work. I get an X error message which crashes my app.

3. I am having a problem, however, when I draw a widget that contains a text entry box. Namely, if I select the entry and try to change it, my app hangs. Seems similar to previous problems I've read about. Here's a backtrace.

#0  0x4035ccd1 in sigsuspend () from /lib/libc.so.6
#1  0x401a5118 in __pthread_wait_for_restart_signal ()
  from /lib/libpthread.so.0
#2  0x401a73cc in __pthread_alt_lock () from /lib/libpthread.so.0
#3  0x401a3480 in pthread_mutex_lock () from /lib/libpthread.so.0
#4  0x402503da in _XUnregisterFilter () from /usr/X11R6/lib/libX11.so.6
#5  0x402299bc in XQueryExtension () from /usr/X11R6/lib/libX11.so.6
#6  0x4022007b in XInitExtension () from /usr/X11R6/lib/libX11.so.6
#7  0x40260618 in XkbUseExtension () from /usr/X11R6/lib/libX11.so.6
#8  0x40257c25 in XRefreshKeyboardMapping () from /usr/X11R6/lib/libX11.so.6
#9  0x402574d9 in XkbLookupKeySym () from /usr/X11R6/lib/libX11.so.6
#10 0x402580e6 in XLookupString () from /usr/X11R6/lib/libX11.so.6
#11 0x404a49be in _XimLocalFilter ()
  from /usr/X11R6/lib/X11/locale/common/ximcp.so.2
#12 0x4024fc65 in XFilterEvent () from /usr/X11R6/lib/libX11.so.6
#13 0x4015a88d in gdk_wm_protocols_filter () from /usr/lib/libgdk-1.2.so.0
#14 0x4015aade in gdk_wm_protocols_filter () from /usr/lib/libgdk-1.2.so.0
#15 0x4018ae75 in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#16 0x4018b32c in g_get_current_time () from /usr/lib/libglib-1.2.so.0
#17 0x4018b55c in g_main_run () from /usr/lib/libglib-1.2.so.0
#18 0x400b1083 in gtk_main () from /usr/lib/libgtk-1.2.so.0
#19 0x080664b0 in main (argc=1, argv=0xbffff764) at main.c:162

I'm at a total loss to fix this.

4. If I open up a GtkFileSelection window first ... then there is no problem. I wonder why this is the case? I've tried popping up other dialog / popup windows too, but they don't have the same effect.

If any one has some help / input I'd really appreciate it. Currently, this is a show stopper ...as I'm trying to design a "widget/object" for my app using the text widget ... to create a type of built in text editor. It has the same problem.

Thanks,

DT

--
Technical Director - Virginia Center for Computer Music
http://www.virginia.edu/music/vccm.html





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