Re: Xlib: unexpected async reply (sequence ......)



I read both Gtk+ and Gtkmm FAQ before. I saw that you have to surround your calls with gdk_threads_enter/leave() pair if you want to call Gtk+/Gtkmm from a separate thread. I tried this and also I've added Glib::threads_init() at the beginning of my main.cpp. I am still getting Xlib: unexpected async reply error. When I resize my window or capture an image, I get this error. I used scale_simple() function to scale both my video and my captured images. What would I be doing wrong here? I really need to find a solution for this problem. Any help is greatly appreciated.
Thank you for your time again.


From: Paul Davis <paul linuxaudiosystems com>
Reply-To: paul linuxaudiosystems com
To: MERT TUGCU <merttugcu hotmail com>
CC: gtkmm-list gnome org
Subject: Re: Xlib: unexpected async reply (sequence ......)
Date: Tue, 17 Jan 2006 19:10:16 -0500

On Tue, 2006-01-17 at 16:49 -0600, MERT TUGCU wrote:
> Dear all,
>
> I have been trying to solve this problem for a long time with no success. I > have a video application which shows the video stream, captures an image and > make some processing on the captured image. Therefore, I have divided the > screen into 4 and show video, images and so on in each part of the screen. I
> search the internet and this problem shows up if your application is
> multi-threaded. Since my application has to be multi-threaded (because of > the video stream), I am frequently getting this error and the application
> crashes.
> Now, as far as I've seen, there are two things that could be done. One, is
> using the gdk_threads_enter / leave() pair. Do I need to use this pair
> whenever I need to update the GUI? Also I saw in one web page that I also > need to use XInitThreads() function and this might solve the problem which
> did not.
> Can someone please give a solution to get rid of this problem? I also looked
> to the GTK+ FAQ. I've seen that a lot of people are struggling with this
> problem.

The FAQ has suggested answers to your problem. XInitThreads is not
relevant to your problem.







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