GNOME Bugzilla – Bug 663182
Dragging any item on OS X crashes Banshee
Last modified: 2011-11-20 18:42:48 UTC
Created attachment 200429 [details] debug log Dragging any item in Banshee on OS X instantly crashes Banshee with 100% reproducability.
Add Jon Ralls to CC, hopefully he can provide a quick glance to indicate if this is a GTK+ on OS X issue or if we need to look in Banshee, GTK# or Mono. To make his life easier, this is gtk+ 2.12.7 without patches applied. The build used can be found on banshee.fm/download should he wish to experiment.
two-dot-TWELVE?! That's a PEBKAC. You should be using a current build (gtk-osx builds 2.24.8 with some additional patches, and nothing earlier will work on Lion) if you want help from upstream (meaning any of the gtk-quartz maintainers, including me). I will point out, though, that it looks like you're trying to convert a null image. You should check your environment to make sure that gtk can find gdk-pixbuf.
my apologies a typo, 2.24.7 of course
OK. I can fix _gtk_quartz_image_from_pixbuf() so that it doesn't crash, but it will still have to return a NULL, which will likely crash your program, so you still need to figure out why it's getting an empty pixbuf.
Sounds good to me
*** Bug 560566 has been marked as a duplicate of this bug. ***
OK, fix pushed onto gtk-2-24, gtk-3-2, and master. Moreover, I suspect that you are running up against Bug 658767 or Bug 658722, both of which are fixed, but the fixes missed 2.24.8. There may be nothing wrong with your code -- try to run against a gtk-2-24 checkout build and see if banshee works.
David, Can we close this bug?
I'll set off a build and confirm, then I will close it myself. If it does fix the problem I will prepare respun builds of 2.2.1 and 2.3.1 for the website.
Since .8 has not been released yet I cherrypicked the patch, 658767 already appears to be on .7 so I skipped that one. I tried to backport the 658722 patch to 2.24 (as it is a 3.1 era patch) and collectively the two patches + .7. That combination prevents the nasty crasher in gtk+, now Banshee still crashes but it appears to be as John pointed out purely our own fault. Domain: 'Gtk' Level: Critical Message: _gtk_quartz_create_image_from_pixbuf: assertion `pixbuf_width == 0 && pixbuf_height == 0' failed Trace follows: at GLib.Log.PrintTraceLogFunction(System.String domain, LogLevelFlags level, System.String message) 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.Startup() at Banshee.Gui.GtkBaseClient.Startup(System.String[] args) at Nereid.Client.Main(System.String[] args) I'll do some digging tomorrow to see if I can find the specific place we pass an empty pixbuf along. Alan McGovern suggested looking for IconName= to see if we forget to set it somewhere. Thank you for looking at this John
Right, sorry I got the numbers confused. You might check your backport of the 658722 patch against http://git.gnome.org/browse/gtk-osx/tree/patches/0006-Bug-658722-Drag-and-Drop-sometimes-stops-working.patch Which is the patch I'm applying against 2.24.6 for gtk-osx builds. You might also look in ~/Library/Logs/CrashReporter to see if you have a better crash dump. Set a breakpoint on gtk/gtkdnd-quartz.c:1186 ( if (!info->icon_pixbuf) in gtk_drag_begin_internal() ) and step through to see if/how the pixbuf is getting set.
2.24.8 + the above patch and we no longer crash in gtk nor in Banshee. However there is no drag and drop functionality, you can mark items but nothing happens upon dragging them. The same traceback as above is in the log. Since it doesn't crash and since we are moving to GTK#3 sometime soonish I am not going to investigate further for now and I am happy to call this "fixed". Thank you John, you are a giant amongst men,
Created attachment 201711 [details] [review] Correction to earlier patch, applies against Gtk+-2.24.8 Wait, I screwed up the earlier patch. Please apply this patch on top of it or onto 2.24.8 and see if it works better.
Excellent John, thank you very much. With the patch above Banshee can drag and drop on OS X withou crashing and there is even a nice little icon to make it pretty. I owe you a beer.
Pushed to gtk-2-24, gtk-3-2, and master.