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 656699 - CD device doesn't show up in Banshee
CD device doesn't show up in Banshee
Status: RESOLVED WONTFIX
Product: banshee
Classification: Other
Component: Importing
git master
Other Linux
: Normal normal
: ---
Assigned To: Banshee Maintainers
Banshee Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2011-08-16 20:53 UTC by Andrew Evans
Modified: 2020-03-17 09:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to try to fix the issue (1.42 KB, patch)
2011-08-19 10:40 UTC, Bertrand Lorentz
none Details | Review

Description Andrew Evans 2011-08-16 20:53:06 UTC
I've been having intermittent trouble with my CD drive not showing up in Banshee. Sometimes rebooting fixes it. It seems to be some sort of bug in block device iteration, possibly LVM related. (I have two volume groups and ~8 logical volumes, and strace shows Banshee iterating over /dev/dm-* device nodes just before the error occurs).

I'm running Ubuntu 11.04 (Natty) amd64. I git clone'd master:

* master a147adf [origin/master] Updated Galician translations

and still have the same problem:

[1 Info  12:59:07.878] Updating web proxy from GConf
[1 Debug 12:59:07.882] Direct connection, no proxy in use
[1 Debug 12:59:07.894] Extension service started (GnomeService, 0.018099)
[1 Debug 12:59:07.895] Extension service started (AmazonMp3DownloaderService, 0.001629)
[1 Debug 12:59:07.962] Extension service started (EmusicService, 0.066757)
[1 Debug 12:59:08.009] Extension service started (NotificationAreaService, 0.047289)
[1 Debug 12:59:08.011] Extension service started (CoverArtService, 0.001627)
[1 Warn  12:59:08.058] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Gio')
  at Banshee.Hardware.Gio.UdevMetadataSource.get_IdMediaDevice () [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs:37 
  at Banshee.Hardware.Gio.RawBlockDevice.get_IdMediaPlayer () [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawBlockDevice.cs:68 
  at Banshee.Hardware.Gio.RawDevice..ctor (Banshee.Hardware.Gio.Manager manager, Banshee.Hardware.Gio.GioMetadataSource gioMetadata, Banshee.Hardware.Gio.UdevMetadataSource udevMetadata) [0x0001b] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawDevice.cs:114 
  at Banshee.Hardware.Gio.RawBlockDevice..ctor (Drive drive, Banshee.Hardware.Gio.Manager manager, Banshee.Hardware.Gio.GioDriveMetadetaSource gioMetadata, Banshee.Hardware.Gio.UdevMetadataSource udevMetadata) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.RawVolume.get_Parent () [0x00012] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawVolume.cs:242 
  at Banshee.Hardware.Gio.BlockDevice.Resolve (IDevice device) [0x00045] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/BlockDevice.cs:51 
  at Banshee.Hardware.Gio.HardwareManager.Resolve (IDevice device) [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/HardwareManager.cs:113 
  at Banshee.Hardware.Gio.Manager+<GetAllDevices>c__Iterator3.MoveNext () [0x000cb] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs:144 
  at Banshee.Hardware.Gio.HardwareManager+<GetAllBlockDevices>c__Iterator2`1[Banshee.Hardware.ICdromDevice].MoveNext () [0x000a3] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/HardwareManager.cs:103 
  at Banshee.Hardware.HardwareManager+<CastToCustomDevice>c__IteratorA`1[Banshee.Hardware.ICdromDevice].MoveNext () [0x0007e] in /home/andrew/banshee/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs:217 
  at Banshee.AudioCd.AudioCdService.Initialize () [0x0003c] in /home/andrew/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs:62 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00034] in /home/andrew/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs:210 
[1 Warn  12:59:08.058] Extension `Banshee.AudioCd.AudioCdService' not started: Object reference not set to an instance of an object
[1 Warn  12:59:08.061] Caught an exception - System.NullReferenceException: Object reference not set to an instance of an object (in `Banshee.Gio')
  at Banshee.Hardware.Gio.UdevMetadataSource.get_IdMediaDevice () [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs:37 
  at Banshee.Hardware.Gio.RawBlockDevice.get_IdMediaPlayer () [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawBlockDevice.cs:68 
  at Banshee.Hardware.Gio.RawDevice..ctor (Banshee.Hardware.Gio.Manager manager, Banshee.Hardware.Gio.GioMetadataSource gioMetadata, Banshee.Hardware.Gio.UdevMetadataSource udevMetadata) [0x0001b] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawDevice.cs:114 
  at Banshee.Hardware.Gio.RawBlockDevice..ctor (Drive drive, Banshee.Hardware.Gio.Manager manager, Banshee.Hardware.Gio.GioDriveMetadetaSource gioMetadata, Banshee.Hardware.Gio.UdevMetadataSource udevMetadata) [0x00000] in <filename unknown>:0 
  at Banshee.Hardware.Gio.RawVolume.get_Parent () [0x00012] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/RawVolume.cs:242 
  at Banshee.Hardware.Gio.BlockDevice.Resolve (IDevice device) [0x00045] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/BlockDevice.cs:51 
  at Banshee.Hardware.Gio.HardwareManager.Resolve (IDevice device) [0x00000] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/HardwareManager.cs:113 
  at Banshee.Hardware.Gio.Manager+<GetAllDevices>c__Iterator3.MoveNext () [0x000cb] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/Manager.cs:144 
  at Banshee.Hardware.Gio.HardwareManager+<GetAllBlockDevices>c__Iterator2`1[Banshee.Hardware.ICdromDevice].MoveNext () [0x000a3] in /home/andrew/banshee/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/HardwareManager.cs:103 
  at Banshee.Hardware.HardwareManager+<CastToCustomDevice>c__IteratorA`1[Banshee.Hardware.ICdromDevice].MoveNext () [0x0007e] in /home/andrew/banshee/src/Core/Banshee.Services/Banshee.Hardware/HardwareManager.cs:217 
  at Banshee.AudioCd.AudioCdService.Initialize () [0x0003c] in /home/andrew/banshee/src/Extensions/Banshee.AudioCd/Banshee.AudioCd/AudioCdService.cs:62 
  at Banshee.ServiceStack.ServiceManager.StartExtension (Mono.Addins.TypeExtensionNode node) [0x00034] in /home/andrew/banshee/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs:210 
[1 Warn  12:59:08.061] Extension `Banshee.AudioCd.AudioCdService' not started: Object reference not set to an instance of an object
[1 Info  12:59:08.061] All services are started 2.060136

This cheesy hack "fixes" it:

--- cut here ---
diff --git a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
index 04cb12b..699a4f9 100644
--- a/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
+++ b/src/Backends/Banshee.Gio/Banshee.Hardware.Gio/LowLevel/UdevMetadataSource.cs
@@ -34,7 +34,7 @@ namespace Banshee.Hardware.Gio
         }
 
         public string IdMediaDevice {
-            get { return Device.GetProperty ("ID_MEDIA_PLAYER"); }
+            get { return Device == null ? null : Device.GetProperty ("ID_MEDIA_PLAYER"); }
         }
 
         public string Model {
--- cut here ---

This doesn't look like the right way to fix it, but hopefully someone familiar with the code has a better idea.

I can attach the strace output, if it helps.
Comment 1 Bertrand Lorentz 2011-08-19 10:40:16 UTC
Created attachment 194211 [details] [review]
Patch to try to fix the issue

I've come up with another patch to try to address this issue.

Could you check if it works for you ?

As you problem seems specific to your system, I can't reproduce it.
Comment 2 André Klapper 2020-03-17 09:23:45 UTC
Banshee is not under active development anymore and had its last code changes more than three years ago. Its codebase has been archived.

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather transfer the project
to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the
responsibility for active development again.
See https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/264 for more info.