Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583918 - net-irc/hexchat-2.10.2-r1: Gdk-WARNING **: GdkWindow 0x56000ed unexpectedly destroyed when opening the plasma dashboard the second time and the tray icon is enabled
Summary: net-irc/hexchat-2.10.2-r1: Gdk-WARNING **: GdkWindow 0x56000ed unexpectedly d...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: nvinson234
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 02:31 UTC by Navid Zamani
Modified: 2017-01-19 01:34 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
backtrace-hexchat.log (backtrace.log,21.38 KB, text/x-log)
2016-05-25 13:51 UTC, Navid Zamani
Details
gui_tray=0.patch (gui_tray=0.patch,451 bytes, patch)
2016-07-12 03:52 UTC, Navid Zamani
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Navid Zamani 2016-05-24 02:31:28 UTC
When pressing Super-Return (Win-Enter?), Hexchat crashes/exist, and the following is printed in .xsession-errors or the console:

(hexchat:25388): Gdk-WARNING **: GdkWindow 0x5a0010a unexpectedly destroyed
The program 'hexchat' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 311488 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

The error might only happen on the *second* time the combo is pressed.
(On my system it open the dashboard, and the error only happens if I open, close, and open the dashboard again.)

I tested with two keyboard layouts: de-neo and de.

Another thing printed in .xsession errors, but where I’m not sure it is related, as it might be caused by the Plasma dashboard, is many repetitions of:

QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setCompositionMode: Painter not active
QPainter::end: Painter not active, aborted

This bug exists for a least a year now. So earlier version are probably affected as well.
Comment 1 Pacho Ramos gentoo-dev 2016-05-24 11:03:06 UTC
please try to get a proper backtrace:
https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces
Comment 2 Navid Zamani 2016-05-24 11:22:26 UTC
Hey, I tried, but this is all I can get:

someuser@somemachine ~ $ gdb hexchat
GNU gdb (Gentoo 7.11 vanilla) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hexchat...done.
(gdb) run
Starting program: /usr/bin/hexchat 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe35d1700 (LWP 10759)]

(hexchat:10749): Gdk-WARNING **: GdkWindow 0x58000f3 unexpectedly destroyed
The program 'hexchat' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 25635 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[Thread 0x7fffe35d1700 (LWP 10759) exited]
[Inferior 1 (process 10749) exited with code 01]
(gdb) thread apply all bt full
(gdb) bt full
No stack.
(gdb) quit
someuser@somemachine ~ $ 

I don’t know enough about gdb or debugging C or X, to know how to proceed…
Comment 3 Navid Zamani 2016-05-24 11:23:19 UTC
Forgot to mention, that I ran 

CFLAGS="-Og -march=athlon64-sse3 -pipe -ggdb" CXXFLAGS="-Og -march=athlon64-sse3 -pipe -ggdb" FEATURES="nostrip" emerge -1 hexchat

before that.
Comment 4 Pacho Ramos gentoo-dev 2016-05-25 10:42:36 UTC
Try running the program with --sync option as it suggests
Comment 5 Navid Zamani 2016-05-25 11:38:00 UTC
(In reply to Pacho Ramos from comment #4)
> Try running the program with --sync option as it suggests

I already did. Tried any combination. And as was already obvious, it changed nothing. When running it from the console, things are printed to the console directly anyway.

I suspect the program does not actually crash, but exited normally, with an error code, as gdb states.

Again, the full gdb output:

someuser@somemachine ~ $ gdb hexchat
GNU gdb (Gentoo 7.11 vanilla) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://bugs.gentoo.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hexchat...done.
(gdb) set args --sync
(gdb) run
Starting program: /usr/bin/hexchat --sync
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffe35d1700 (LWP 4563)]

(hexchat:4553): Gdk-WARNING **: GdkWindow 0x56000ed unexpectedly destroyed
The program 'hexchat' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 63956 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
[Thread 0x7fffe35d1700 (LWP 4563) exited]
[Inferior 1 (process 4553) exited with code 01]
(gdb) thread apply all bt full
(gdb) bt full
No stack.
(gdb) bt
No stack.
(gdb) quit
someuser@somemachine ~ $ 

Note the “--sync”, the “exited with code 01” and hence the lack of any back trace output.
Comment 6 Navid Zamani 2016-05-25 11:49:02 UTC
I’d say the question is why hexchat receives an “X Window System error” in the first place.

Changing the GTK2 widget kit from QTCurve to Raleigh changed nothing, by the way.

XOrg.0.log and dmesg show no unusual output, and no errors nor warnings. Hexchat crashing did not add any messages.

I can only wonder what problem exactly X has with hexchat’s window(s)… No clue on how to make it tell me.
Comment 7 Navid Zamani 2016-05-25 11:57:05 UTC
I changed the summary to the actual X error.

Also. Is there a way to tell GDB to halt when receiving the X error, instead of letting Hexchat exit? That way one could see the actual function call stack, and easily locate the problem.
Comment 8 Navid Zamani 2016-05-25 12:12:29 UTC
Telling gdb to

    (gdb) break gdk_x_error
    Function "gdk_x_error" not defined.
    Make breakpoint pending on future shared library load? (y or [n]) y
    Breakpoint 1 (gdk_x_error) pending.

does not change anything either. I doesn’t load any new libs except for libthread_db anyway, and never breakpoints.

And neither does running

    export GDK_SYNCHRONIZE=1

in bash before starting gdb.
Comment 9 Navid Zamani 2016-05-25 12:22:09 UTC
FINALLY! I got a backtrace!

I had stripped gdk libs, which apparently means one has to break on _XError. (Talk about nobody mentioning that!)

Here is the backtrace. It looks rather useless though:

Thread 2 (Thread 0x7fffe35d1700 (LWP 5197)):
#0  0x00007ffff55ae80d in poll () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007fffe8e2558b in ?? () from /usr/lib64/libpulse.so.0
No symbol table info available.
#2  0x00007fffe8e15d31 in pa_mainloop_poll () from /usr/lib64/libpulse.so.0
No symbol table info available.
#3  0x00007fffe8e1641d in pa_mainloop_iterate () from /usr/lib64/libpulse.so.0
No symbol table info available.
#4  0x00007fffe8e164d0 in pa_mainloop_run () from /usr/lib64/libpulse.so.0
No symbol table info available.
#5  0x00007fffe8e254b4 in ?? () from /usr/lib64/libpulse.so.0
No symbol table info available.
#6  0x00007fffe8bc8aa7 in ?? () from /usr/lib64/pulseaudio/libpulsecommon-8.0.so
No symbol table info available.
#7  0x00007ffff586d446 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#8  0x00007ffff55b791d in clone () from /lib64/libc.so.6
No symbol table info available.

Thread 1 (Thread 0x7ffff7f858c0 (LWP 5187)):
#0  0x00007ffff4fcecd0 in _XError () from /usr/lib64/libX11.so.6
No symbol table info available.
#1  0x00007ffff4fcbe27 in ?? () from /usr/lib64/libX11.so.6
No symbol table info available.
#2  0x00007ffff4fcbed5 in ?? () from /usr/lib64/libX11.so.6
No symbol table info available.
#3  0x00007ffff4fccd98 in _XReply () from /usr/lib64/libX11.so.6
No symbol table info available.
#4  0x00007ffff4fc874d in XSync () from /usr/lib64/libX11.so.6
No symbol table info available.
#5  0x00007ffff4fc87db in ?? () from /usr/lib64/libX11.so.6
No symbol table info available.
#6  0x00007ffff4fa96e3 in XChangeProperty () from /usr/lib64/libX11.so.6
No symbol table info available.
#7  0x00007ffff7a6e8d4 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#8  0x00007ffff7908573 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#9  0x00007ffff647a602 in ?? () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#10 0x00007ffff64954da in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#11 0x00007ffff6495b9f in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#12 0x00007ffff7a022a0 in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#13 0x00007ffff647a3e2 in g_closure_invoke () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#14 0x00007ffff648c70c in ?? () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#15 0x00007ffff64957cc in g_signal_emit_valist () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#16 0x00007ffff6495b9f in g_signal_emit () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#17 0x00007ffff79fa92e in gtk_widget_hide () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#18 0x00007ffff79fa9dc in ?? () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#19 0x00007ffff6480eb8 in g_object_run_dispose () from /usr/lib64/libgobject-2.0.so.0
No symbol table info available.
#20 0x00007ffff78d4545 in gtk_main_do_event () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#21 0x00007ffff7543fdc in ?? () from /usr/lib64/libgdk-x11-2.0.so.0
No symbol table info available.
#22 0x00007ffff617bf8e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#23 0x00007ffff617c1f5 in ?? () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#24 0x00007ffff617c542 in g_main_loop_run () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#25 0x00007ffff78d3287 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
No symbol table info available.
#26 0x000000000042afb5 in fe_main () at fe-gtk.c:320
No locals.
#27 0x0000000000464c53 in main (argc=2, argv=0x7fffffffdaf8) at hexchat.c:1137
        i = <optimized out>
        ret = <optimized out>


Does it suffice to find the problem, or would compiling a few libs with debug infos help? (If yes, which ones?)
Comment 10 Navid Zamani 2016-05-25 13:51:11 UTC
Created attachment 435352 [details]
backtrace-hexchat.log

Ok, I went ahead and rebuilt

    =x11-libs/gtk+-2.24.30
    =x11-libs/libX11-1.6.3
    =dev-libs/glib-2.48.0-r1

to get a more useful backtrace.

Looks like XlibInt.c or some file related to it is missing??

I hope this finally helps.
Comment 11 Navid Zamani 2016-05-25 13:59:29 UTC
Ok, I could make it not exit anymore, by disabling the tray icon.

Might it be, because KDE 4 /still/ is in early beta, considering its tray icon plasmid still failing to properly handle being placed in the dashboard? ^^
Comment 12 Navid Zamani 2016-05-25 14:05:31 UTC
Changing the keyboard shortcut did not help.
So I fixed the bug title to reflect that.
Comment 13 Navid Zamani 2016-07-12 03:52:35 UTC
Created attachment 440400 [details, diff]
gui_tray=0.patch

I’ve made a workaround patch for new installations too.

This disables the tray icon by default.

If you already have a config file, you need to manually disable the tray icon in the Hexchat settings, or remove the config files after re-emerging with the patch.
Comment 14 Matthias Maier gentoo-dev 2016-10-05 05:37:32 UTC
commit 6816215a399ff87e5b1e2910c76b4386f7fa4736
Author: Matthias Maier <tamiko@gentoo.org>
Date:   Wed Oct 5 00:32:46 2016 -0500

    net-irc/hexchat: dropping proxied maintainer and proxy-maint
    
    This packages hasn't seen any update at all, no reaction to bugs since 2014.
    Further, it is not listed on the list of proxy maintained packages [1].
    
    [1] https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/Proxy_Maintained_Packages
    
    Package-Manager: portage-2.3.0
Comment 15 Anthony Ryan 2016-10-07 02:43:48 UTC
I think this issue needs to be filed upstream with the HexChat developers. They accept bug reports on GitHub: https://github.com/hexchat/hexchat/issues (please search and see if you can find your issue there already, there did seem to be a couple of candidates).

I can certainly appreciate how frustrating this behavior is, but I don't want to keep a patch that disables functionality that some people rely on. You are of course welcome to continue using the user patches functionality (docs here: https://wiki.gentoo.org/wiki//etc/portage/patches).
Comment 16 Anthony Ryan 2016-10-07 02:53:03 UTC
There's a lot of upstream issues about the tray icon causing crashes, any of these could be the same:

https://github.com/hexchat/hexchat/issues/450
https://github.com/hexchat/hexchat/issues/628
https://github.com/hexchat/hexchat/issues/1684
Comment 17 nvinson234 2016-10-15 19:13:26 UTC
Is this still an issue with 2.12.2?
Comment 18 Navid Zamani 2017-01-19 01:00:40 UTC
Hi. I now use Enlightenment, and can’t reproduce the bug anymore. Maybe because I don’t have a system tray here, because I can’t get it to work, due to E currently transitioning to a new desklet/widget engine (Bryce).

I enabled the system tray functionality anyway, and pressed the same key I used on KDE4 to open the dashboard, on which the defunct E system tray widget lies, just like in KDE4, and I can not get Hexchat to collapse.

So thanks to dumping KDE4, I could declare it “WORKSFORME”.

Btw, if Hexchat is so dead, what’s the replacement/successor?
Comment 19 Lars Wendler (Polynomial-C) gentoo-dev 2017-01-19 01:34:32 UTC
(In reply to Navid Zamani from comment #18)
> Btw, if Hexchat is so dead, what’s the replacement/successor?

It's not dead. Perhaps the package had some rough times but unlike xchat (which is really dead since 2010), hexchat is still an actively developed project.