[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XQueryTree problems in xgps
From: |
Willem Rein Oudshoorn |
Subject: |
Re: XQueryTree problems in xgps |
Date: |
27 Jan 2002 20:57:55 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
Adam Fedor <fedor@doc.com> writes:
> Several people have had X errors and eventual a Segmentation Fault in
> this code. I can't figure out why since we are taking a 'supposedly'
> valid window pointer to the parent window and just passing it to
> XQueryTree. The error doesn't occur all the time (not even on the
> 1st-3rd calls to XQueryTree), and I can't even reproduce the error on
> my machine (although I think I may have gotten it once).
In the first attempt the fix the problem that GNUstep applications
crash when the drag image was partly outside the screen I also
used XQueryTree. This was a real problem because I got exactly
the same problems as occured here. XQueryTree would fail.
My guess is that in the, now outcommented code, it happens on
the second or further iterations of the loop. (If it happens
at all of course).
What seemed to help in the DnD image case was using XGrabServer
during the loop.
If this is the case I can image two scenarios, but both are
rather far fetched.
1 - Bug? in XServer that throw this error when both the
Window manager and XQueryTree are in progress.
This is only supported by the observation that in
the DnD case it typically occured when I changed
Desktops. This means lots of mapping in and mapping
out of windows. Also the only time I got the bug
you commented out was also during mapping/unmapping
of other windows.
2 - After the first call to XQueryTree the resulting parent
is destroyed by the XServer, probably on behalve of the
Window manager.
3 - Maybe it is not allowd to use XQueryTree until after
the first XExpose event.
Unlikely, but it perhaps it is not a good idea to
investigate the WindowTree in an initial reparentNotify
event.
Wim Oudshoorn.
- Re: XQueryTree problems in xgps,
Willem Rein Oudshoorn <=