After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342104 - XChat-Gnome crashes on /server <servername> [ubuntu]
XChat-Gnome crashes on /server <servername> [ubuntu]
Status: RESOLVED FIXED
Product: xchat-gnome
Classification: Other
Component: general
0.11
Other All
: Normal critical
: ---
Assigned To: xchat-gnome maintainers
xchat-gnome maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-17 09:36 UTC by Jaco Adriaansen
Modified: 2006-06-21 22:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that *might* fix the issue (1.26 KB, patch)
2006-05-26 08:24 UTC, Isak Savo
none Details | Review
Backtrace after patch. (2.54 KB, text/plain)
2006-05-26 19:38 UTC, Jaco Adriaansen
  Details

Description Jaco Adriaansen 2006-05-17 09:36:37 UTC
Steps to reproduce:
If you are connected to a server and you type /server <servername> in the input
box the application crashes.

1. Connect to any random server.
2. Type /server <servername> in the input box.
3. Watch the program crash.

Stack trace:
Backtrace was generated from '/usr/bin/xchat-gnome'

(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1225771328 (LWP 5609)]
[New Thread -1240560720 (LWP 5634)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1225771328 (LWP 5609))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 strcmp
    from /lib/tls/i686/cmov/libc.so.6
  • #5 g_list_find_custom
    from /usr/lib/libglib-2.0.so.0
  • #6 get_gs_screensaver_active
    from /usr/lib/xchat-gnome/plugins/autoaway.so
  • #7 plugin_auto_load
  • #8 text_emit
  • #9 xchat_free
  • #10 server_set_defaults
  • #11 server_sendquit
  • #12 handle_command
  • #13 handle_multiline
  • #14 text_entry_get_type
  • #15 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #16 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #17 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_signal_emitv
    from /usr/lib/libgobject-2.0.so.0
  • #19 gtk_bin_get_child
    from /usr/lib/libgtk-x11-2.0.so.0
  • #20 gtk_binding_set_by_class
    from /usr/lib/libgtk-x11-2.0.so.0
  • #21 gtk_binding_set_by_class
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_bindings_activate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 gtk_entry_set_visibility
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #27 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #28 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #31 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #33 gtk_window_activate_key
    from /usr/lib/libgtk-x11-2.0.so.0
  • #34 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #35 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #36 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #37 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #38 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #39 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #40 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #41 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #42 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #43 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #44 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #45 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #46 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #47 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #48 fe_main
  • #49 main
  • #0 __kernel_vsyscall


Other information:
Comment 1 Guillaume Desmottes 2006-05-17 11:34:59 UTC
I can't reproduce this bug.

On which server do you try to connect?
Comment 2 Jaco Adriaansen 2006-05-17 20:37:06 UTC
I just found out that even when I am not connected it crashes. 

I tried to connect to irc.efnet.net this time. (In reply to comment #1)
> I can't reproduce this bug.
> 
> On which server do you try to connect?
> 

I just tried irc.efnet.net. I actually found out that it even crashes when I am not connected to any server, so the program crashes on the /server command.

I am currently running Ubuntu Dapper Drake with an 2.6.15 (-22-686) kernel. So if it isn't reproducable it might be an Ubuntu problem.
Comment 3 Guillaume Desmottes 2006-05-17 21:19:39 UTC
I use Dapper too and can't reproduce this crash.

Have you any server marked as autoconnect?

Could you install this package and paste a trace with debug symbols?
http://www.cerkinfo.be/~kujo/xchat-gnome_0.11-0ubuntu5_i386.deb
Comment 4 Jaco Adriaansen 2006-05-18 08:05:14 UTC
I have two servers for autoconnect. 

When I have no servers for autoconnect and I type /server <server> then nothing happens (the program does nothing actually; it does not connect).

Stacktrace with the new package:
Backtrace was generated from '/usr/bin/xchat-gnome'

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1225529664 (LWP 7790)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1225529664 (LWP 7790))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 strcmp
    from /lib/tls/i686/cmov/libc.so.6
  • #5 g_list_find_custom
    from /usr/lib/libglib-2.0.so.0
  • #6 network_change_cb
    at autoaway.c line 198
  • #7 plugin_hook_run
    at plugin.c line 517
  • #8 plugin_emit_print
    at plugin.c line 573
  • #9 text_emit
    at text.c line 1551
  • #10 server_disconnect
    at server.c line 1071
  • #11 server_connect
    at server.c line 1525
  • #12 cmd_server
    at outbound.c line 2874
  • #13 handle_command
    at outbound.c line 3951
  • #14 handle_user_input
    at outbound.c line 4025
  • #15 handle_multiline
    at outbound.c line 4037
  • #16 text_entry_activate
    at text-entry.c line 246
  • #17 g_cclosure_marshal_VOID__VOID
    from /usr/lib/libgobject-2.0.so.0
  • #18 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #19 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #20 g_signal_emitv
    from /usr/lib/libgobject-2.0.so.0
  • #21 gtk_bin_get_child
    from /usr/lib/libgtk-x11-2.0.so.0
  • #22 gtk_binding_set_by_class
    from /usr/lib/libgtk-x11-2.0.so.0
  • #23 gtk_binding_set_by_class
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 gtk_bindings_activate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #26 gtk_entry_set_visibility
    from /usr/lib/libgtk-x11-2.0.so.0
  • #27 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #28 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #29 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #30 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #31 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #32 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #33 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #34 gtk_window_propagate_key_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #35 gtk_window_activate_key
    from /usr/lib/libgtk-x11-2.0.so.0
  • #36 _gtk_marshal_BOOLEAN__BOXED
    from /usr/lib/libgtk-x11-2.0.so.0
  • #37 g_cclosure_new_swap
    from /usr/lib/libgobject-2.0.so.0
  • #38 g_closure_invoke
    from /usr/lib/libgobject-2.0.so.0
  • #39 g_signal_stop_emission
    from /usr/lib/libgobject-2.0.so.0
  • #40 g_signal_emit_valist
    from /usr/lib/libgobject-2.0.so.0
  • #41 g_signal_emit
    from /usr/lib/libgobject-2.0.so.0
  • #42 gtk_widget_activate
    from /usr/lib/libgtk-x11-2.0.so.0
  • #43 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #44 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #45 _gdk_events_queue
    from /usr/lib/libgdk-x11-2.0.so.0
  • #46 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #47 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #48 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #49 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #50 fe_main
    at fe-gnome.c line 180
  • #51 main
    at xchat.c line 1017
  • #0 __kernel_vsyscall

Comment 5 Guillaume Desmottes 2006-05-20 23:03:36 UTC
This crash seems to occur in the autoaway plugin.
Could you try without this plugin loaded please?
Comment 6 Jaco Adriaansen 2006-05-21 09:00:13 UTC
Perfect, it works now. 
Comment 7 Guillaume Desmottes 2006-05-21 09:53:14 UTC
I forwarded this bug to the author of the autoaway plugin.
Comment 8 Isak Savo 2006-05-21 11:33:09 UTC
I'll take a look at this in the next couple of days. It looks like there's a race since it crashes doing traversal of a GList. 

Is xchat-gnome multithreaded? Are there any guarantees that plugin methods are always called from the same thread? Can plugin methods be called simultaniously from separate threads?
Comment 9 David Trowbridge 2006-05-21 18:59:40 UTC
No, there are no threads.
Comment 10 Isak Savo 2006-05-26 08:24:10 UTC
Created attachment 66256 [details] [review]
Patch that *might* fix the issue

I can't reproduce the error here (ubuntu dapper, using xchat-gnome from trunk), but the only thing I can think of that could be causing this is a null pointer passed to strcmp.

This patch ensures that null won't be passed to it, and also changes the collating function to one that handles UTF-8 encoded strings.
Comment 11 Guillaume Desmottes 2006-05-26 18:27:52 UTC
Jaco, could you try this patch and say if it fixs your crash please?
Comment 12 Jaco Adriaansen 2006-05-26 19:38:02 UTC
I patched autoaway, but now the program crashes when I type. I have attached the backtrace.
Comment 13 Jaco Adriaansen 2006-05-26 19:38:59 UTC
Created attachment 66301 [details]
Backtrace after patch.
Comment 14 Isak Savo 2006-05-27 11:11:21 UTC
Hmm.. Jaco: Could you try running these two commands from the terminal:

xprop -f _SCREENSAVER_STATUS 32ac -root _SCREENSAVER_STATUS

and

xscreensaver-command --time

If I run xprop to get the screensaver status on Ubuntu Dapper, it gets terminated by SIGABRT.. This worked fine on Breezy when I wrote this plug-in. Does anyone with more X11 knowledge have a clue about what could be causing this? 
Comment 15 Jaco Adriaansen 2006-05-27 11:47:58 UTC
xprop -f _SCREENSAVER_STATUS 32ac -root _SCREENSAVER_STATUS
_SCREENSAVER_STATUSAborted

xscreensaver-command --time
xscreensaver-command: no screensaver is running on display :0.0


The xscreensaver is not running at my system, instead I should have gnome-screensaver but intrestingly enough it doesnt seem to be running either.

I tried to enable both xscreensaver and gnome-screensaver manually, but no change.

Remarkebly my auto-join server did not respond and when I tried the /server command it worked. But when I closed the program, restarted it and choose a server with the connectbox from the menu it crashed. 

Somehow it seems to be getting more random - the stacktrace is the same (except for the threadnumbers).

Comment 16 Isak Savo 2006-06-09 20:58:10 UTC
I'm starting to get out of ideas here. The xprop that gets signaled on ubuntu is suspicious, but I tried a simple test program containing only the code in get_screensaver_running_xprop (which seems to be the top of the stacktrace before the signal kills xchat-gnome) and it runs fine (no signal to the app).

Jaco: it would be interesting to see what happens if you manage to get gnome-screensaver up and running. the autoaway plugin should default to that if it can get contact with it over dbus. (you *do* have a dbus enabled build of xchat-gnome, right?)

What do you get by running:

dbus-send --session --dest=org.gnome.ScreenSaver --type=method_call --print-reply  --reply-timeout=2000 /org/gnome/ScreenSaver org.gnome.ScreenSaver.getActive

Expected result is something like:
method return sender=:1.3 -> dest=:1.33
 boolean false

Perhaps we should remove support for x11 screensaver since it seems to cause problems? Or at least not call xprop... Guillaume and David, what are your opinions?

Jaco: Could you also try applying the following patch to see if it's really xprop that is crashing xchat-gnome:
Index: xscreensaver.c
===================================================================
--- xscreensaver.c      (revision 10513)
+++ xscreensaver.c      (working copy)
@@ -83,7 +83,7 @@
 gboolean
 get_xss_screensaver_active (void)
 {
-       if (g_find_program_in_path ("xprop"))
+       if (g_find_program_in_path ("xprop") && FALSE)
                return get_screensaver_running_xprop();
        else if (g_find_program_in_path ("xscreensaver-command"))
                return get_screensaver_running_xs_cmd();
Comment 17 Guillaume Desmottes 2006-06-09 21:14:36 UTC
Since gnome-screensaver is now an official GNOME module, IMHO we can safely drop x11 screensaver support.
Comment 18 David Trowbridge 2006-06-17 01:02:20 UTC
A lot of people are still running xscreensaver.  I'd prefer to keep support there
Comment 19 David Trowbridge 2006-06-21 22:23:53 UTC
OK, it looks like after the patch here, it's getting the same crash as #344340
As such, I'm going to apply it and mark this one fixed.