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 550777 - Crash after issuing command banshee-1 --stop
Crash after issuing command banshee-1 --stop
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: general
1.2.1
Other All
: Normal critical
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-04 06:21 UTC by undertakingyou
Modified: 2008-09-09 18:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix the crash by checking if the track is null (1.07 KB, patch)
2008-09-04 19:28 UTC, Bertrand Lorentz
committed Details | Review

Description undertakingyou 2008-09-04 06:21:50 UTC
Steps to reproduce:
1. Have banshee playing a song
2. issue command 'banshee-1 --stop' in any way (i.e. via keyboard shortcut or terminal.)
3. Right click on banshee tray icon and voila! crash.



Stack trace:
Banshee Log:
[Info  17:58:11.635] Running Banshee 1.2.1
[Info  17:58:14.277] All services are started 2.380794s
[Info  17:58:17.350] nereid Client Started
[Warn  17:58:17.635] Caught an exception - org.freedesktop.Hal.NoSuchProperty: No property volume.is_mounted on device with id /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy (in `NDesk.DBus.Proxies')
  at IDeviceProxy.GetPropertyBoolean (System.String ) [0x00000] 
  at Hal.Device.GetPropertyBoolean (System.String key) [0x00000] 
  at Banshee.HalBackend.Volume.get_IsMounted () [0x00000] 
  at Banshee.HalBackend.Volume.CheckVolumeMounted (Banshee.HalBackend.Volume volume) [0x00000] 
  at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] 
[Warn  17:58:18.085] Caught an exception - org.freedesktop.Hal.NoSuchProperty: No property volume.is_mounted on device with id /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy (in `NDesk.DBus.Proxies')
  at IDeviceProxy.GetPropertyBoolean (System.String ) [0x00000] 
  at Hal.Device.GetPropertyBoolean (System.String key) [0x00000] 
  at Banshee.HalBackend.Volume.get_IsMounted () [0x00000] 
  at Banshee.HalBackend.Volume.CheckVolumeMounted (Banshee.HalBackend.Volume volume) [0x00000] 
  at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] 
[Warn  17:58:18.383] Caught an exception - org.freedesktop.Hal.NoSuchProperty: No property volume.is_mounted on device with id /org/freedesktop/Hal/devices/platform_floppy_0_storage_platform_floppy (in `NDesk.DBus.Proxies')
  at IDeviceProxy.GetPropertyBoolean (System.String ) [0x00000] 
  at Hal.Device.GetPropertyBoolean (System.String key) [0x00000] 
  at Banshee.HalBackend.Volume.get_IsMounted () [0x00000] 
  at Banshee.HalBackend.Volume.CheckVolumeMounted (Banshee.HalBackend.Volume volume) [0x00000] 
  at Banshee.HalBackend.Volume.Resolve (Banshee.HalBackend.BlockDevice parent, Hal.Manager manager, Hal.Device device) [0x00000] 
[Warn  18:01:23.643] Called Reload on Banshee.Collection.Database.DatabaseTrackListModel for source New Playlist but cache is null;  Did you forget to call AfterInitialized () in your DatabaseSource ctor?
Exception in Gtk# callback delegate
  Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception.
System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.NotificationArea.NotificationAreaService.OnNotificationAreaPopupMenuEvent (System.Object o, Gtk.PopupMenuArgs args) [0x00000] 
  at Banshee.NotificationArea.X11NotificationAreaBox.OnPopupMenuEvent () [0x00000] 
  at Banshee.NotificationArea.X11NotificationAreaBox.OnButtonPressEvent (System.Object o, Gtk.ButtonPressEventArgs args) [0x00000] 
  at Gtk.Widget.ButtonPressEventSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) [0x00000] 
   at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal)
   at Gtk.Widget.ButtonPressEventSignalCallback(IntPtr arg0, IntPtr arg1, IntPtr gch)
   at Gtk.Widget.ButtonPressEventSignalCallback(IntPtr , IntPtr , 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(System.String[] args)
[Warn  18:03:22.845] Caught an exception - interrupted (in `System')
  at System.Net.Sockets.Socket.Accept () [0x00000] 
  at Banshee.Daap.DaapProxyWebServer.ServerLoop () [0x00000]

dmesg output:
[104277.840196] mono[16681]: segfault at d091fa2c ip b7f80815 sp b7447020 error 5 in libglib-2.0.so.0.1600.4[b7f56000+b0000]
[107079.473114] mono[17012]: segfault at 26a60744 ip b7f2c815 sp b73f3020 error 4 in libglib-2.0.so.0.1600.4[b7f02000+b0000]
[132648.956893] mono[17732]: segfault at d17111c4 ip b7e3b815 sp b7302020 error 5 in libglib-2.0.so.0.1600.4[b7e11000+b0000]

Other information:
I am using 1.2.1 on ubuntu 8.04 from the ppa.launchpad.net repo's.
Issue is exhibited on both my laptop and desktop machines. 
Laptop is running 2.6.26.2 kernel compiled from source, Desktop is running 2.6.26.3 kernel compiled from source.  Both machine's are using the latest source nVidia drivers.
dmesg outputs one of those lines for each crash.
Comment 1 Bertrand Lorentz 2008-09-04 16:59:45 UTC
I can reproduce this with SVN trunk, here's the stacktrace I get :

Object reference not set to an instance of an object
System.NullReferenceException: Object reference not set to an instance of an object
  at Banshee.NotificationArea.NotificationAreaService.OnNotificationAreaPopupMenuEvent (System.Object o, Gtk.PopupMenuArgs args) [0x00031] in /home/lorentz/Projets/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/NotificationAreaService.cs:282 
  at Banshee.NotificationArea.X11NotificationAreaBox.OnPopupMenuEvent () [0x0000d] in /home/lorentz/Projets/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs:351 
  at Banshee.NotificationArea.X11NotificationAreaBox.OnButtonPressEvent (System.Object o, Gtk.ButtonPressEventArgs args) [0x00093] in /home/lorentz/Projets/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs:263 
  at Gtk.Widget.ButtonPressEventSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch) [0x00000] 
  at (wrapper native-to-managed) Gtk.Widget:ButtonPressEventSignalCallback (intptr,intptr,intptr)
  at (wrapper managed-to-native) Gtk.Application:gtk_main ()
  at Gtk.Application.Run () [0x00000] 
  at Banshee.Gui.GtkBaseClient.Run () [0x00027] in /home/lorentz/Projets/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:276 
  at Banshee.Gui.GtkBaseClient.Startup () [0x00000] in /home/lorentz/Projets/banshee/src/Core/Banshee.ThickClient/Banshee.Gui/GtkBaseClient.cs:217 
  at Hyena.Gui.CleanRoomStartup.Startup (Hyena.Gui.StartupInvocationHandler startup) [0x00048] in /home/lorentz/Projets/banshee/src/Libraries/Hyena.Gui/Hyena.Gui/CleanRoomStartup.cs:54 
Comment 2 Bertrand Lorentz 2008-09-04 19:28:17 UTC
Created attachment 118043 [details] [review]
Fix the crash by checking if the track is null

When the player is stopped, CurrentTrack is null.
This patch fixes the crash by adding a "if (... != null)" check.
Comment 3 Dan Ziemba 2008-09-08 19:49:28 UTC
I was also having the same problem using banshee 1.2.1-r1 on gentoo.  See my gentoo bug report for a full description:

http://bugs.gentoo.org/show_bug.cgi?id=236886

I recompiled with the above patch and the problem was solved with no noticeable side effects.  
Comment 4 Gabriel Burt 2008-09-09 00:12:32 UTC
Looks good, please commit.
Comment 5 Bertrand Lorentz 2008-09-09 18:19:55 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.