kdemultimedia3 - patch to fix lockup of audiocd:/ kioslave

Tilman Vogel tilman.vogel at web.de
Fri Sep 22 12:08:53 BST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I debugged and fixed a problem of kdemultimedia-3.5.4 which causes the
audiocd kioslave to not work at all on my machine.

I sent the patch to bugs.kde.org
<http://bugs.kde.org/show_bug.cgi?id=126174> but will attach it to this
message too, because it's very small and because it didn't get any
attention on bugs.kde.org yet. For convenience, I quote from my comment
there:

- - CUT -
In fact, cdparanoia-IIIalpha9.8-550 (from SuSE 10.0) does not return any
device name in drive->ioctl_device_name (see
kdemultimedia/kioslave/audiocd/audiocd.cpp). Therefore, the device
cannot be opened and the number of tracks is not initialised. Then
kio_audiocd hangs in a (virtually) endless loop, eating up lots of
memory while filling a very long list of track names...

I have to admit, that I am very surprised by the for me incomprehensible
mix of using libwm (inside kscd) and libcdda_paranoia... paranoia
already gives the right count in the drive structure referred above... so?

Anyway, I could fix the problem by the attached patch which falls back
to drive->cdda_device_name in case drive->ioctl_device_name is a null
pointer or zero length.

I don't know how cdparanoia behaves on other drives, but with my drive I
definitely need this. cdparanoia identifies my drive as follows:

Found an accessible SCSI CDROM drive.
Looking at revision of the SG interface in use...
SG interface version 3.5.33; OK.

CDROM model sensed sensed: MATSHITA DVD-RAM UJ-822S 1.61

Other SG drives with that version of cdparanoia most likely all have
this problem.
- - CUT -

I'd be happy if you did include it!

Cheers and thank you!

Tilman

- --- ../kdemultimedia-3.5.4/kioslave/audiocd/audiocd.cpp	2006-07-22
10:10:55.000000000 +0200
+++ kioslave/audiocd/audiocd.cpp	2006-09-16 23:34:37.000000000 +0200
@@ -216,5 +216,8 @@

 #if defined(__linux__)
- -        d->cd.setDevice(drive->ioctl_device_name, 50, false);
+	if(drive->ioctl_device_name && strlen(drive->ioctl_device_name))
+	  d->cd.setDevice(drive->ioctl_device_name, 50, false);
+	else
+	  d->cd.setDevice(drive->cdda_device_name, 50, false);
 #else
         d->cd.setDevice(drive->cdda_device_name, 50, false);


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFFE8RF9ZPu6Yae8lkRAkdcAJ9w2NCeylTM3PVT4bD4qN7+ZPub2wCeJgr0
r3Tzbhb9UthwWLuVuDq+AQY=
=FQ8B
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list