GNOME Bugzilla – Bug 524706
Add to playlist causes banshee to hang
Last modified: 2009-09-03 19:38:35 UTC
Steps to reproduce: 1. play music 2. click on add to playlist 3. hang Stack trace: Domain: 'Gtk' Level: Critical Message: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) at GLib.Log.PrintTraceLogFunction(IntPtr , LogLevelFlags , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() at Banshee.Gui.GtkBaseClient.Startup() at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) at Banshee.Gui.GtkBaseClient.Entry() at Nereid.Client.Main() Domain: 'Gtk' Level: Critical Message: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) at GLib.Log.PrintTraceLogFunction(IntPtr , LogLevelFlags , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() at Banshee.Gui.GtkBaseClient.Startup() at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) at Banshee.Gui.GtkBaseClient.Entry() at Nereid.Client.Main() Other information:
I get the same problem with svn trunk, gtk# version 2.10.2 - anytime I mouse over the 'Add to Playlist' menu item the submenu is not properly drawn and the above critical error is given - banshee hangs, and my entire desktop is unresponsive - I'm forced to kill banshee from an ssh terminal. I tracked down the issue tosrc/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs:286 - Action.Proxies isn't casting properly to a MenuItem. The (o as Gtk.Action).Proxies call isn't causing the hang itself, but if I replace the cast as below there is no hang and the (empty) submenu draws correctly - but obviously there is no functionality in place now, so its just a disabling workaround for the time being (so I can stop inadvertently crashing banshee when I go to the wrong menu). Unfortunately my gtk-fu is nowhere near up to par and I can't work around this, but hopefully this can help somebody else to find a fix (and I'd be interesting in seeing how it should be done). Index: src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs =================================================================== --- src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs (revision 3574) +++ src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs (working copy) @@ -285,9 +285,10 @@ Gdk.Pixbuf pl_pb = Gdk.Pixbuf.LoadFromResource ("source-playlist-16.png"); Source active_source = ServiceManager.SourceManager.ActiveSource; // TODO find just the menu that was activated instead of modifying all proxies - foreach (MenuItem menu in (o as Gtk.Action).Proxies) { + foreach (Gtk.Widget w in (o as Gtk.Action).Proxies) { + MenuItem menu = new MenuItem (); Menu submenu = new Menu (); menu.Submenu = submenu;
Thanks for the tip Matt. Please svn up and test, I committed a similar patch that should fix it.
gaminggeek says this doesn't fix it for him, reopening. Matt, could you test anyway?
*** Bug 524915 has been marked as a duplicate of this bug. ***
I also have this bug. I am using gtk-sharp 2.12.0-1 btw, on Arch Linux. (I'm kinda new to all this bug reporting stuff, so please tell me if I need to add more information, thanks.
I can confirm with *just* updated trunk.
New trunk, now it's no longer hanging, it simply throws an exception and crashes. Here is the output: Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.ArgumentException: 'source-playlist-16.png' is not a valid resource name of assembly 'Banshee.ThickClient, Version=0.98.3.15585, Culture=neutral, PublicKeyToken=null'. at Gdk.PixbufLoader.InitFromAssemblyResource (System.Reflection.Assembly assembly, System.String resource) [0x00000] at Gdk.PixbufLoader..ctor (System.Reflection.Assembly assembly, System.String resource) [0x00000] at Gdk.Pixbuf..ctor (System.Reflection.Assembly assembly, System.String resource) [0x00000] at Gdk.Pixbuf.LoadFromResource (System.String resource) [0x00000] at Banshee.Gui.TrackActions.OnAddToPlaylistMenu (System.Object o, System.EventArgs args) [0x00000] in /home/jean/software/applications/banshee-trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/TrackActions.cs:280 at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr data) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.Signal.voidObjectCallback(IntPtr handle, IntPtr data) at GLib.Signal.voidObjectCallback(IntPtr , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() in /home/jean/software/applications/banshee-trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 113 at Banshee.Gui.GtkBaseClient.Startup() in /home/jean/software/applications/banshee-trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 55 at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) in /home/jean/software/applications/banshee-trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:line 54 at Banshee.Gui.GtkBaseClient.Entry() in /home/jean/software/applications/banshee-trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:line 50 at Nereid.Client.Main() in /home/jean/software/applications/banshee-trunk/banshee/src/Clients/Nereid/Nereid/Client.cs:line 45
(In reply to comment #7) > New trunk, now it's no longer hanging, it simply throws an exception and > crashes. Here is the output: svn up again, that's been fixed
Yes, it has.. but we're still back to the old error. I just get a bunch of these in the terminal : Domain: 'Gtk' Level: Critical Message: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) at GLib.Log.PrintTraceLogFunction(IntPtr , LogLevelFlags , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() at Banshee.Gui.GtkBaseClient.Startup() at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) at Banshee.Gui.GtkBaseClient.Entry() at Nereid.Client.Main() And the same behaviour - gui freeze.
Created attachment 108841 [details] Debugging patch Please download this patch and apply it to trunk with patch -p0 < track_actions.patch Reproduce the bug and attach all output starting with the first "AA".
AA BB CC EE FF FF2 GG HH II JJ BB CC EE FF FF2 GG HH II JJ KK Domain: 'Gtk' Level: Critical Message: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) at GLib.Log.PrintTraceLogFunction(IntPtr , LogLevelFlags , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() at Banshee.Gui.GtkBaseClient.Startup() at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) at Banshee.Gui.GtkBaseClient.Entry() at Nereid.Client.Main() (this last error repeats until I kill Banshee from an ssh term)
Same as the above : (Nereid:4691): Gtk-WARNING **: Shuffle: missing action ShuffleAction AA BB CC EE FF FF2 GG HH II JJ BB CC EE FF FF2 GG HH II JJ KK Domain: 'Gtk' Level: Critical Message: gtk_widget_event: assertion `WIDGET_REALIZED_FOR_EVENT (widget, event)' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) at GLib.Log.PrintTraceLogFunction(IntPtr , LogLevelFlags , IntPtr ) at Gtk.Application.gtk_main() at Gtk.Application.gtk_main() at Gtk.Application.Run() at Banshee.Gui.GtkBaseClient.Run() at Banshee.Gui.GtkBaseClient.Startup() at Hyena.Gui.CleanRoomStartup.Startup(Hyena.Gui.StartupInvocationHandler startup) at Banshee.Gui.GtkBaseClient.Entry() at Nereid.Client.Main()
*** Bug 529143 has been marked as a duplicate of this bug. ***
Sorry to bother anyone, but I'd like a status update on this bug. It's the only thing holding back Banshee for me, and I believe, many more, and I hope it doesn't make it into the final release, or being ignored. A word or two from a developer would be greatly appreciated. Thanks! Jean.
Hi Jean, Well....I think I know what the problem is, but I haven't found a solution yet. The issue is when a Gtk.Action is activated, we handle it in that method. But there are several "proxies" (widgets) that can activate it - the context menu and the playback menu. Ideally when we handle it, we'd get just the proxy that triggered it, and add the submenu to it etc, but there doesn't seem to be a way to do that (that I've found yet, at least). The crasher you guys are seeing seems to be caused by us setting up the submenu for the proxy that wasn't the trigger.
Hi all. I've noticed that the bug doesn't manifest if I use the Aurora theme engine. It appears to manifest on all the other theme engines, however.
I found the source of the bug. In the gnome themes I was using, they weren't setting gtk-menu-popup-delay. When I set it in a theme's gtkrc, the bug immediately disappears. To test, open your themes's gtkrc, and add this line at the top of it : gtk-menu-popup-delay=50
Correction! The problem was that in ~/.gtkrc-2.0 I had set a line gtk-menu-popup-delay = 0 Commenting out this line or changing it's value to another positive integer will make this bug disappear. So, to anyone still suffering from this bug, can you check for the existence of such a line in your theme/.gtkrc-2.0? gtk-menu-popup-delay = 0
Gaminggeek, Matt, Diego: Does Jean's fix work for you?
Yep is does for me
Until we can find the actual fix here, Banshee will load a custom gtkrc file: ~/.config/banshee-1/gtkrc Create that file and add this to it: gtk-menu-popup-delay = 1
2008-05-28 Aaron Bockover <abock@gnome.org> * src/Clients/Nereid/Nereid/Client.cs: Force the gtk-menu-popup-delay setting to be 225ms (the GTK+ default value) to avoid a nasty bug when it is possibly set to 0ms by some gtkrc files (BGO #524706) ... Going to mark FIXED for now, but it's an ugly hack. The reality is this is probably a race in GTK+ itself.
*** Bug 568141 has been marked as a duplicate of this bug. ***
Reported by a user on Banshee 1.4.1. What theme were you using, Matthew? Can you try other themes?
I was using a mash-up of clearlooks and Aurora. I'll try out some different themes and let you know what the results are.
I have not tested switching themes but removing gtk-menu-popup-delay = 1 from my gtkrc file did resolve the issue for me. Thank you Jean Azzopardi for the workaround!
*** Bug 569384 has been marked as a duplicate of this bug. ***
Removing "gtk-menu-popup-delay = 0" from the gtkrc file worked for me.
*** Bug 570949 has been marked as a duplicate of this bug. ***
Hi, I reported Bug 570949. I am using Ciano theme and was having: gtk-menu-popup-delay = 1 but I got the freeze anyway, but once I created ~/.config/banshee-1/gtkrc (it was not there) and set gtk-menu-popup-delay = 1 I cannot experience hang up anymore.
Seems like we are running the Gtk.Rc.ParseString ("gtk-menu-popup-delay = 225"); line too early, before the theme is loaded. Do we need to listen for StyleChanged or whathaveyou and run that?
Created attachment 133674 [details] [review] Move the gtk-menu-popup-delay override to be called whenever StyleSet Please apply to git master (http://banshee-project.org/download/development) and let me know if this fixes it for you.
Ok, I tested by setting gtk-menu-popup-delay = 0 in my theme's gtkrc, and got the crash w/o this patch, didn't w/ it. Committed to master and stable branches.
*** Bug 593979 has been marked as a duplicate of this bug. ***