brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.17k stars 615 forks source link

Crash on session startup with BadWindow #311

Closed Vladimir-csp closed 6 years ago

Vladimir-csp commented 8 years ago

I'm seeing conky sometimes crashing when started by openbox XDG autostart with this error:

X Error of failed request:  BadWindow (invalid Window parameter)
  Major opcode of failed request:  3 (X_GetWindowAttributes)
  Resource id in failed request:  0x2600008
  Serial number of failed request:  153
  Current serial number in output stream:  154

Seems to be affected by this bug: https://sourceforge.net/p/conky/bugs/443/

$ conky -v
conky 1.10.3 compiled Mon Jul 11 09:56:12 UTC 2016 for Linux 3.16.0-4-amd64 x86_64

Compiled in features:

System config file: /etc/conky/conky.conf
Package library path: /usr/lib/conky

 General:
  * math
  * hddtemp
  * portmon
  * IPv6
  * wireless
  * support for IBM/Lenovo notebooks
  * builtin default configuration
  * old configuration syntax
  * apcupsd
  * iostats
  * ncurses
  * Internationalization support
 X11:
  * Xdamage extension
  * Xinerama extension (virtual display)
  * XDBE (double buffer extension)
  * Xft
  * ARGB visual
  * Own window

 Music detection:
  * MPD
  * MOC

 Default values:
  * Netdevice: eth0
  * Local configfile: $HOME/.conkyrc
  * Localedir: /usr/share/locale
  * Maximum netdevices: 64
  * Maximum text size: 16384
  * Size text buffer: 256
OmegaPhil commented 7 years ago

Wow, I come to report this again as its still happening (1 failure in 10 logins during the current test), and I see someone else has even reported it and referenced my original bug!

Its been 5 years since this has been reported, can a maintainer please discuss my idea of a non-fatal X11 error handler?

OmegaPhil commented 7 years ago

@Vladimir-csp: I'll port the old patch I made to the latest code tomorrow, so at least we can have working conky during startups.

OmegaPhil commented 7 years ago

Shocking that I can't just attach a diff to an issue! Absolutely no need to fork and make a push request, just a single simple change...

https://gist.github.com/OmegaPhil/41ffea67fa72a4e4675010f3969c93ae#file-make-x11-errors-non-fatal-diff

When d/led as a raw file, the hash checks out, so it looks like pasting as a gist is good enough.

I have logged out and in 10 times with the latest changes, without issue (I'd expect 1 failure with this so far).

su8 commented 6 years ago

@lasers There are error handlers

https://github.com/brndnmtthws/conky/blob/0a17be8a9d2e94bf24297035a9ed442693fd773e/src/x11.cc#L430

https://github.com/brndnmtthws/conky/blob/0a17be8a9d2e94bf24297035a9ed442693fd773e/src/x11.cc#L431

@brndnmtthws should we enable the error handlers by default and not only for "DEBUG" purposes ?

lasers commented 6 years ago

@su8 Try it and see? I'm thinking maybe we could have a configuration setting instead.

lasers commented 6 years ago

@su8 Same author https://github.com/brndnmtthws/conky/issues/312

su8 commented 6 years ago

@lasers we need @brndnmtthws agreement to include the error handlers by default and not only for debugging purposes.

brndnmtthws commented 6 years ago

@su8 yeah, I think having these errors in the release build is fine.

lasers commented 6 years ago

Closed via https://github.com/brndnmtthws/conky/pull/588.