LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 04-16-2007, 02:51 AM   #1
dipk_23
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Rep: Reputation: 0
Question GETTING "Xlib: unexpected async reply (sequence 0x9541): ERROR MESSAGE


hi all,
I just started to work on one project in linux. It is already running in windows and now i m porting it to the Linux machine. In my module (which is in QT), i m getting the XML string (via QUdpSocket) from windows system (client) to my Linux system (server). Depending upon the XML i have to perform the keyboard and mouse events programmatically (via X11/XLib XTestFakeButtonEvent and XSendEvent functions). Every thing is running fine. i m getting XML from windows system and (sometimes) could be able to perform the appropriate actions.
But, the problem arrise after 3-4 seconds of launching application, when my application continuously gets XML string, It stops to get any XML and stops emulating mouse events with error:

Xlib: unexpected async reply (sequence 0x3092)

Also sometimes this error message comes on console just after launching the application.

Regards
Deepak Chanalia
=deepak
 
Old 04-23-2007, 06:54 AM   #2
dipk_23
LQ Newbie
 
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Lightbulb Solution to Xlib: unexpected async reply

Dear all,
After mugging so much in above problem i had having in my multi threaded application, eventually i come to the solution. The problem was in QDialog::connect() function; initially i was using QObject::connect (sender, Signalmethod,receiver,Slotmethod) form of connect; in this form my sender and receiver objects were in different threads and Qt was unable to synchronize these two objects in multi threading environment.

Then i used QObject::connect (sender, Signalmethod,receiver,Slotmethod, Qt::ConnectionType) form of connect function, with Qt:irectConnection as last argument. In the first form connect was using Default value for last argument which is Qt::AutoConnection, in which the signal is queued until the event loop is able to deliver it to the slot. In the Later form (using Qt:irectConnection), if the signal is emitted from the thread in which the receiving object is not lives, the slot is invoked directly. i.e. the signal is immediately delivered to the slot.

Deepak Chanalia
=deepak
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Frame check sequence"-error (802.11b Ad hoc) rickthemick Linux - Wireless Networking 2 08-21-2008 10:04 AM
Error Our attempts to find your SCHEMA for "attributetypes" has return UNEXPECTED res Niceman2005 Linux - Software 0 03-04-2007 07:49 PM
cygwin Xlib: unexpected async repy JVWay Linux - General 1 03-16-2006 10:52 AM
Why there is an error like "Xlib:unexpected async reply" icoming Programming 0 02-16-2005 11:23 PM
Error message from remadmin :Xlib: nathangg Linux - General 3 02-21-2003 02:28 PM


All times are GMT -5. The time now is 08:26 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration