GNOME Bugzilla – Bug 342411
totem locks when finish playing a media with a menu open
Last modified: 2006-06-23 10:45:55 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/totem/+bug/45730 "Description of the problem: If the Sound -> Languages menu is open when a media finishes playing then totem will lockup and GNOME will no longer respond to mouse clicks. Steps to reproduce: 1. Run totem /usr/share/sounds/login.wav 2. While it is playing but before it is finished go to the Sound -> Languages menu so that Auto and Uncompressed 16-bit PCM audio are displayed. 3. Wait for the login sound to finish playing. Expected results: Menu to be closed? Totem and desktop to remain responsive and to redraw themselves. Actual results: Part of the desktop stops being redrawn. Applets continue to redraw themselves. Desktop and every application (including applets) stops responding to mouse input, alt tab stops working etc. Only way to recover is to kill totem from a virtual terminal. Additional information: The following is printed when totem is launched from a terminal: (totem:13430): Gtk-CRITICAL **: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Version information: totem 1.4.1-0ubuntu2"
It seems to me this might be a bug somewhere deeper down the stack (Gtk+ maybe?). In any case, the attached patch seems to fix it.
Created attachment 67203 [details] [review] possible fix
Comment on attachment 67203 [details] [review] possible fix >Index: src/totem-menu.c >=================================================================== >RCS file: /cvs/gnome/totem/src/totem-menu.c,v >retrieving revision 1.20 >diff -u -p -r1.20 totem-menu.c >--- src/totem-menu.c 28 Apr 2006 10:45:07 -0000 1.20 >+++ src/totem-menu.c 12 Jun 2006 17:53:05 -0000 >@@ -334,7 +334,7 @@ totem_sublang_equal_lists (GList *orig, > static void > totem_languages_update (Totem *totem, GList *list) > { >- GtkWidget *item, *submenu; >+ GtkWidget *item, *submenu, *old_submenu; > GtkWidget *lang_menu; > int current; > >@@ -348,6 +348,13 @@ totem_languages_update (Totem *totem, GL > > /* Languages */ > item = glade_xml_get_widget (totem->xml, "tmw_languages_menu_item"); >+ >+ old_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (item)); >+ if (old_submenu != NULL) >+ { >+ gtk_menu_popdown (GTK_MENU (old_submenu)); >+ } Don't need braces when it's only one line. > submenu = glade_xml_get_widget (totem->xml, "tmw_menu_languages"); > if (lang_menu == NULL) > { >@@ -365,7 +372,7 @@ totem_languages_update (Totem *totem, GL > static void > totem_subtitles_update (Totem *totem, GList *list) > { >- GtkWidget *item, *submenu; >+ GtkWidget *item, *submenu, *old_submenu; > GtkWidget *sub_menu; > int current; > >@@ -379,6 +386,13 @@ totem_subtitles_update (Totem *totem, GL > > /* Subtitles */ > item = glade_xml_get_widget (totem->xml, "tmw_subtitles_menu_item"); >+ >+ old_submenu = gtk_menu_item_get_submenu (GTK_MENU_ITEM (item)); >+ if (old_submenu != NULL) >+ { >+ gtk_menu_popdown (GTK_MENU (old_submenu)); >+ } Same here. Rest looks good to go. Please commit to gnome-2-14 and HEAD.
Thanks, committed (minus those braces): 2006-06-13 Tim-Philipp Müller <tim at centricular dot net> * src/totem-menu.c: (totem_languages_update), (totem_subtitles_update): Pop down language/subtitle menus before replacing them with a different one, otherwise the session might lock up hard if a menu is replaced while being open (#342411).
*** Bug 345699 has been marked as a duplicate of this bug. ***