Bug 196 - Unloading Trayicon plugin crashes Sylpheed-Claws
: Unloading Trayicon plugin crashes Sylpheed-Claws
Status: RESOLVED FIXED
: Sylpheed-Claws (GTK1)
Plugins
: 0.9.3
: PC Linux
: P2 normal
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2003-06-24 11:09 by
Modified: 2003-08-04 06:05 (History)


Attachments
gdb stack trace (3.86 KB, text/plain)
2003-07-30 01:30, Ricardo Mones
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2003-06-24 11:09:15
Everytime im trying to unload Trayicon plugin sylpheed-0.9.0claws50 crashes
with
"Segmentation fault".
------- Comment #1 From 2003-07-12 23:10:46 -------
I don't know the real reason why it crashes but I've tracked it down a bit: It
seems that for some reason the plugin is not removed from the list of loaded
plugins and set_plugin_list in gtk/pluginwindow.c crashes when it tries to
display it. If you comment out gtk_widget_destroy in plugin_done in trayicon.c
you can unload the plugin, but then the dialog crashes when you close it.

The bug is not present in the Sylpheed-Claws 0.9.0 release tarball.
------- Comment #2 From 2003-07-12 23:40:04 -------
Also crashed in 0.9.3:
======================

Sylpheed version 0.9.3claws
GTK+ version 1.2.10
Features: gdk-pixbuf
Operating system: Linux 2.4.20-gentoo-r2 (i686)
C Library: GNU libc 2.3.1
--
[New Thread 16384 (LWP 907)]
0x45c990e9 in wait4 () from /lib/libc.so.6
#0  0x45c990e9 in wait4 () from /lib/libc.so.6
#1  0x45d15b64 in __DTOR_END__ () from /lib/libc.so.6
#2  0x45ee8aa3 in waitpid () from /lib/libpthread.so.0
#3  0x0813d28c in crash_handler (sig=917) at crash.c:540
#4  <signal handler called>
#5  0x403e6b90 in ?? ()
#6  0x46e92b89 in gdk_event_translate () from /usr/lib/libgdk-1.2.so.0
#7  0x46e92ccb in gdk_events_queue () from /usr/lib/libgdk-1.2.so.0
#8  0x46e92ef4 in gdk_event_dispatch () from /usr/lib/libgdk-1.2.so.0
#9  0x46179d1e in g_main_dispatch () from /usr/lib/libglib-1.2.so.0
#10 0x4617a1f9 in g_main_iterate () from /usr/lib/libglib-1.2.so.0
#11 0x4617a494 in g_main_run () from /usr/lib/libglib-1.2.so.0
#12 0x46dc570f in gtk_main () from /usr/lib/libgtk-1.2.so.0
#13 0x08069164 in main (argc=1, argv=0xbffff784) at main.c:370
#14 0x45c039e4 in __libc_start_main () from /lib/libc.so.6
------- Comment #3 From 2003-07-13 02:09:06 -------
besides crashing -claws on unload, the trayicon seems to only make it into the
system tray about 25% of the time....this happens on both kde and xfce4 with
.0.9.0 and .0.9.3
------- Comment #4 From 2003-07-30 01:30:52 -------
Created an attachment (id=88) [details]
gdb stack trace
------- Comment #5 From 2003-07-30 01:36:36 -------
A different style of crash (bt full in attachment). Plugin gets unloaded, but
Sylpheed crash on exit. Running under gnome 2 *without* notification area
loaded (icon appears in its own window). (os=Debian/sid/2.4.18-bf2.4, cpu=k6,
gcc=3.3.1\ 20030722)
------- Comment #6 From 2003-07-30 09:25:10 -------
seems like the hook list is not updated correctly after the unloading 
of the plugin. 
can you watch for debug messages - interested in these: 
 
"registed new hook for '%s' as id %d\n"  
"unregisted hook %d in '%s'\n" 
------- Comment #7 From 2003-07-30 20:30:04 -------
1) ricardo had a different bug, which should have been fixed in cvs: 
 
2003-07-30 [alfons]     0.9.3claws81 
 
        * src/common/hooks.c 
                parameter 2 of g_hook_destroy() should really be a hook id 
 
(the result was that hooks were never removed from the hook list) 
 
2) i did also investigate the crasher a little bit; i have the impression 
   that the problem is that the tray icon is not yet removed from the 
   tray, and X sending a message to GTK. it can be "solved" by removing 
 
	gtk_widget_destroy(GTK_WIDGET(trayicon)); 
 
   from trayicon.c::plugin_done() 
 
A real brain teaser (TM) (mostly because of lack of docs). 
 
------- Comment #8 From 2003-07-30 20:45:19 -------
(From update of attachment 88 [details])
change mime type
------- Comment #9 From 2003-07-30 21:11:27 -------
fixed in 0.9.3claws82

* src/plugins/trayicon/trayicon.c
        process pending events before unloading the plugin
------- Comment #10 From 2003-08-02 16:22:35 -------
really fixed ? It's still crashing for me with claws89:

hooks.c:70:registed new hook for 'folder_item_update' as id 2
folder.c:630:Counting total number of messages...
folder.c:630:Counting total number of messages...
plugin.c:137:Plugin Trayicon (from file
/usr/lib/sylpheed-claws/plugins/trayicon.so) loaded
hooks.c:89:unregisted hook 2 in 'folder_item_update'
Segmentation fault
------- Comment #11 From 2003-08-02 17:43:35 -------
Try claws90, i've fixed another bug that could cause this crash.

And make sure you don't load an old plugin from a package of your distribution
you might have installed.
------- Comment #12 From 2003-08-04 06:05:06 -------
still crashing with claws92. And no old versions lying around.