[Xcb] async reply error questions

Pitrich, Karl karl.pitrich at fabasoft.com
Thu May 19 05:55:27 PDT 2005


Hi,

I try to fetch the names of open windows from within mozilla firefox.

I tried 2 approaches, one beeing a mozilla XPROM component,
the other a standalone executeable started from within mozilla.

My Programming against xlib does basically:
  display = XOpenDisplay(NULL);
  findWindowRecursive(DefaultRootWindow(display), windowname);
    where findWindowRecursive recursively does:
      XFetchName()
      XQueryTree()
      (until the requested window name is found.)
  XCloseDisplay(display)
   
I tried multiple variations of using XSynchronize(), XSync()
XLockDisplay() around my code and i tried XInitThreads(), all with no
success.

Some calls to X work, then randomly Mozilla receives a X Error
'Unexpected Async Reply' or, more seldomly 'Bad Window'.

When i put my xlib calls into a standalone executeable, it works fine,
but also fails if i launch the exe from within mozilla with nsIProcess
which actually does execve().

I could agree with google's results that this is some sort of
threading-race condition, (altough I seem to access X only readonly) but
this won't explain why a freshly fork'd process produces the same
results.


I'd appreciate any hints,

thanks,

 / Karl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050519/830c4ba0/attachment.pgp


More information about the xcb mailing list