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 152397 - Crash when showing the "No windows open" message
Crash when showing the "No windows open" message
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: window selector
git master
Other All
: High critical
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-09-11 20:52 UTC by Crispin Flowerday (not receiving bugmail)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Patch (2.74 KB, patch)
2004-09-11 20:53 UTC, Crispin Flowerday (not receiving bugmail)
none Details | Review

Description Crispin Flowerday (not receiving bugmail) 2004-09-11 20:52:18 UTC
If you don't have any windows open, then using the "Window Selector" applet, you
get a "No Windows Open" message, however when you next show the menu, it will
either crash, or print nasty warnings:

  • #0 kill
    from /usr/lib/debug/libc.so.6
  • #1 pthread_kill
    at signals.c line 65
  • #2 __pthread_raise
    at signals.c line 187
  • #3 *__GI_raise
    at ../linuxthreads/sysdeps/unix/sysv/linux/raise.c line 34
  • #4 *__GI_abort
    at ../sysdeps/generic/abort.c line 88
  • #5 g_logv
  • #6 g_log
    at gmessages.c line 541
  • #7 g_object_unref
    at gobject.c line 1590
  • #8 window_menu_popup_menu
    at window-menu.c line 614
  • #9 window_menu_button_press_event
    at window-menu.c line 673
  • #10 _gtk_marshal_BOOLEAN__BOXED
    at gtkmarshalers.c line 82
  • #11 g_closure_invoke
    at gclosure.c line 437
  • #12 signal_emit_unlocked_R
    at gsignal.c line 2435
  • #13 g_signal_emit_valist
    at gsignal.c line 2204
  • #14 g_signal_emit
    at gsignal.c line 2238
  • #15 gtk_widget_event_internal
    at gtkwidget.c line 3563
  • #16 gtk_propagate_event
    at gtkmain.c line 2345
  • #17 gtk_main_do_event
    at gtkmain.c line 1583
  • #18 gdk_event_dispatch
    at gdkevents-x11.c line 2158
  • #19 g_main_dispatch
    at gmain.c line 1942
  • #20 g_main_context_dispatch
    at gmain.c line 2492
  • #21 g_main_context_iterate
    at gmain.c line 2573
  • #22 g_main_loop_run
    at gmain.c line 2777
  • #23 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #24 bonobo_generic_factory_main_timeout
    from /usr/lib/libbonobo-2.so.0
  • #25 bonobo_generic_factory_main
    from /usr/lib/libbonobo-2.so.0
  • #26 panel_applet_callback_data_free
    at panel-applet.c line 1471

The g_object_unref() is not needed, as the "no_windows_item" has been removed
from the menu already, and no more references are held, so it will have already
been destroyed. Patch coming up.
Comment 1 Crispin Flowerday (not receiving bugmail) 2004-09-11 20:53:57 UTC
Created attachment 31493 [details] [review]
Patch

This removes all the references to g_object_unref
(window_menu->no_windows_item); The WindowMenu object doesn't hold an explict
reference, so it shouldn't be unref()'ing it.

It also stops the "Destroy" signal from being attached multiple times to the
menu.
Comment 2 Vincent Noel 2004-09-13 17:40:19 UTC
I cannot find a duplicate - marking as new.
Comment 3 Christian Neumair 2004-10-19 16:26:30 UTC
Thanks for your bug report. Mark?
Comment 4 Arvind S N 2004-10-22 10:44:33 UTC
Crispin: Thanks a lot for the patch. Have checked in a slightly modified version.

2004-10-22  Arvind Samptur  <arvind.samptur@wipro.com>

        Re-worked patch based from Crispin Flowerday <gnome@flowerday.cx>

        * window-menu.c: (window_menu_destroy_menu): Cleanup
        no_windows_item element.
        (window_menu_popup_menu): Attach destory single once.
        Fixes #1527397
Comment 5 Crispin Flowerday (not receiving bugmail) 2004-10-22 10:50:21 UTC
I think you have missed the point of the patch, you must not unref() the
"no_windows_item" widget, the object itself is destroyed when the menu is
destroyed, so that when you come to unref() the widget, it has already been
deleted, and the panel crashes.
Comment 6 Arvind S N 2004-10-22 11:56:22 UTC
crispin: doh! i indeed missed the point. The gtk_container_remove would have
already removed the no_windows_item and we are just left with a dangling pointer.
Feel free to check in to head
Comment 7 Arvind S N 2004-10-22 12:02:21 UTC
reopening till we get it checked in.
Comment 8 Crispin Flowerday (not receiving bugmail) 2004-10-23 10:14:43 UTC
I have checked in the original patch, obviously minus the bits that were already in:

http://lists.gnome.org/archives/cvs-commits-list/2004-October/msg04891.html