chjj / compton

A compositor for X11.
Other
2.24k stars 501 forks source link

Constant error messages in some window managers #52

Open jpkotta opened 11 years ago

jpkotta commented 11 years ago

When I start compton (with no options), it constantly prints error messages like this:

[ 0.03 ] error 9 (BadDrawable) request 153 minor 4 serial 163 [ 0.03 ] error 9 (BadDrawable) request 153 minor 4 serial 170 [ 0.03 ] error 9 (BadDrawable) request 153 minor 4 serial 179 [ 0.03 ] error 9 (BadDrawable) request 153 minor 4 serial 188 [ 0.05 ] error 177 (BadPicture) request 153 minor 8 serial 225 [ 0.05 ] error 177 (BadPicture) request 153 minor 8 serial 231

The "error 9" messages only occur at the beginning, the rest are all "error 177". Compton seems to be working fine other than these messages, but perhaps they indicate an underlying problem?

I've tried it with fvwm 2.6.5, both with my normal config and a null config. I also tried with e16 1.0.11, which gave the same results. Openbox 3.5.0 did not produce the error messages. This happens on multiple machines, one with NVidia graphics and another with Intel.

I'm using commit c7ca3454ee342f6df908bf6a5e8e61f79b90f8a9.

richardgv commented 11 years ago

I'm myself a fvwm user and I encounter the same issue frequently, too. It usually happens on moving/resizing windows (probably related to fvwm's geometry window, and fvwm is calling XGrabServer() when I'm moving/resizing windows?) and when I drop 'n' drop something.

Compton will not check if a window still exists or is still mapped when operating, and it recognizes a window as destroyed/unmapped only when it gets its DestroyNotify/UnmapNotify event from event queue. For performance reasons, we prefer not to check for window existence on every request to X, and Xlib usually does not tell us too much about why a request fails as it operates in asynchronous mode by default, so chances are we can't determine if the window exists by checking the return value of a request to X. The result is, compton will often send requests to X about a window that is no longer there (for example, if it gets an event of a destroyed window that is emitted before its DestroyNotify), and if compton does something related to a window that has been destroyed/unmapped, you will get those errors. As you may or may not know, compton is getting far more errors from X than what you have seen, they are just hidden by default as we do some predictions in code to suppress those error messages. (Try commenting out the things in set_ignore() and you will face a hell lot of errors.) I know they are (usually) harmless, therefore I'm paying less attention to suppress these warnings. These errors are generally nothing related to your graphic cards or drivers. They come up only because how you and your WM is operating.

BadDrawable is typically an indication of operation on a destroyed window, BadPicture could be either a result of BadWindow/BadDrawable or a hint for a more severe issue. But if you are not seeing anything wrong, I would prefer taking time on more important things than those error messages -- I hope I will have time to eventually make them disappear, though. Currently my top priority is to make sure I pass my exam. :-D And the next thing is to get VSync (which they eagerly requested) working.

jpkotta commented 11 years ago

OK, thanks for the explanation.

milahu commented 5 years ago

I hope I will have time to eventually make them disappear

from #154:

These errors are normal (somehow...) and unavoidable (we could hide them but it may cause problems when diagnostics other issues).

to avoid error messages from compton to flood your virtual console.

any progress?

i still get

error    3 BadWindow    request  129 minor    6 serial  $x: "BadWindow (invalid Window parameter)"
error  152 XCB_DAMAGE_BAD_DAMAGE request  143 minor    2 serial  $x: "152"

proposition: rename from error to warning, and add the option to hide warnings.

mikkorantalainen commented 12 months ago

Compton will not check if a window still exists or is still mapped when operating, and it recognizes a window as destroyed/unmapped only when it gets its DestroyNotify/UnmapNotify event from event queue. For performance reasons, we prefer not to check for window existence on every request to X, and Xlib usually does not tell us too much about why a request fails as it operates in asynchronous mode by default, so chances are we can't determine if the window exists by checking the return value of a request to X. The result is, compton will often send requests to X about a window that is no longer there (for example, if it gets an event of a destroyed window that is emitted before its DestroyNotify), and if compton does something related to a window that has been destroyed/unmapped, you will get those errors. [...]

It would have been great to have this information on the manual page! If man compton would have explained this I wouldn't have wasted a couple of hours trying to debug the issue.

I guess it's better to have the explanation in this bug instead of nowhere, though.

I'm copying a fragment of error messages below in case it makes other people easier to find this while googling for the error messages:

[     0.10 ] error    4 BadPixmap    request  152 minor   22 serial   1752: "BadPixmap (invalid Pixmap parameter)"
[     0.10 ] error    9 BadDrawable  request  156 minor    4 serial   1753: "BadDrawable (invalid Pixmap or Window parameter)"
[     0.10 ] error  161 Unknown      request  152 minor   16 serial      0: "GLXBadPixmap"
[     0.13 ] error  161 Unknown      request  152 minor   16 serial      0: "GLXBadPixmap"
[     0.13 ] error  161 Unknown      request  152 minor   23 serial   1783: "GLXBadPixmap"
[     0.13 ] error    4 BadPixmap    request  152 minor   22 serial   2068: "BadPixmap (invalid Pixmap parameter)"
[     0.13 ] error    9 BadDrawable  request  156 minor    4 serial   2069: "BadDrawable (invalid Pixmap or Window parameter)"
[     0.13 ] error  161 Unknown      request  152 minor   16 serial      0: "GLXBadPixmap"
[   399.55 ] error    3 BadWindow    request   15 minor    0 serial 2934094: "BadWindow (invalid Window parameter)"
[   547.95 ] error    3 BadWindow    request  138 minor    7 serial 3792823: "BadWindow (invalid Window parameter)"
[   547.95 ] error  140 BadRegion    request  138 minor   17 serial 3792824: "BadRegion (invalid Region parameter)"

Seeing the explanation above, I think all of these should be ignored. I'm using Xfwm4 version 4.16.1 in case it makes a difference.