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 663182 - Dragging any item on OS X crashes Banshee
Dragging any item on OS X crashes Banshee
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: User Interface
git master
Other Mac OS
: Normal critical
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
: 560566 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-11-01 17:45 UTC by David Nielsen
Modified: 2011-11-20 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
debug log (22.23 KB, text/plain)
2011-11-01 17:45 UTC, David Nielsen
  Details
Correction to earlier patch, applies against Gtk+-2.24.8 (912 bytes, patch)
2011-11-19 19:43 UTC, John Ralls
none Details | Review

Description David Nielsen 2011-11-01 17:45:04 UTC
Created attachment 200429 [details]
debug log

Dragging any item in Banshee on OS X instantly crashes Banshee with 100% reproducability.
Comment 1 David Nielsen 2011-11-06 13:27:51 UTC
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.
Comment 2 John Ralls 2011-11-06 17:51:33 UTC
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.
Comment 3 David Nielsen 2011-11-06 18:09:54 UTC
my apologies a typo, 2.24.7 of course
Comment 4 John Ralls 2011-11-06 18:38:08 UTC
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.
Comment 5 David Nielsen 2011-11-06 19:01:19 UTC
Sounds good to me
Comment 6 David Nielsen 2011-11-07 13:34:11 UTC
*** Bug 560566 has been marked as a duplicate of this bug. ***
Comment 7 John Ralls 2011-11-07 22:36:28 UTC
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.
Comment 8 olivier dufour 2011-11-08 10:40:39 UTC
David, Can we close this bug?
Comment 9 David Nielsen 2011-11-08 12:36:20 UTC
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.
Comment 10 David Nielsen 2011-11-09 20:33:44 UTC
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
Comment 11 John Ralls 2011-11-09 23:18:10 UTC
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.
Comment 12 David Nielsen 2011-11-17 15:40:03 UTC
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,
Comment 13 John Ralls 2011-11-19 19:43:05 UTC
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.
Comment 14 David Nielsen 2011-11-19 23:58:16 UTC
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.
Comment 15 John Ralls 2011-11-20 18:42:48 UTC
Pushed to gtk-2-24, gtk-3-2, and master.