Wednesday, 10 July 2013

AudioCD. Bug hunting: new details.

Do you remember second week report, where I've described my problem with CD ejection, Solid and Amarok? Recently I've received comment with very clever idea. Here it is. Amarok is not the only KDE application which uses Solid, Dolphin is another example. So we can examine behaviour of solid-tester, Amarok and Dolphin in different combinations. Another observation from me was that Dolphin and Amarok both are relatively complex software, so I decided to include KsCd to testing list, because it also uses Solid and it is much simpler.

Then I started testing and found a very interesting behaviour:

solid-tester + KsCd
Everything is going like clockwork: solid-tester receives all signals in time, kscd also perfectly reacts on CD insertion and ejection. Mindful reader may already have idea about where problem lies, but if you don't then just answer a question: what is main difference between KsCd and Amarok/Dolphin? Spoiler:  KsCd doesn't use kio audiocd, but Amarok/Dolphin does.
solid-tester + Dolphin
And this is where fun begins. After brief look it seems that behaviour of solid-tester+Dolphin is the same as behaviour of solid-tester+Amarok. But I managed to gain some extra info. Let me list processes which has dolphin in theirs names (I've trimmed output of ps in order to fit it to reasonable length):
1
2
3
4
5
3635 dolphin
3639 kdeinit4: kio_trash [kdeinit] trash klauncherMT2024.slave-socket dolphinth3635.slave-socket
3640 kdeinit4: kio_file [kdeinit] file klauncherMT2024.slave-socket dolphinKP3635.slave-socket
3641 kdeinit4: kio_file [kdeinit] file klauncherMT2024.slave-socket dolphinbZ3635.slave-socket
3646 kdeinit4: kio_audiocd [kdeinit] audiocd klauncherMT2024.slave-socket dolphinbh3635.slave-socket
Then If you kill dolphin nothing happens. But if we check ps output again then we can see that  kio_audiocd  slave (line 5) is still there. But when you kill it solid-tester receive ejection signal.

 After this experiment I was pretty sure that problem is in solid+kio-audiocd. In order to have more evidences I checked out my libcdio branch and tested it. It works: Amarok and solid-tester both receive insertion and ejection signals normally. Also to test it yourself you can run Dolphin and then insert and eject CD few times AdiocdCD icon from left menu will appear and disappear normally  until you'll decide to load content of AudioCD.

3 comments:

  1. I'm reading with great interest your post about AucioCD in Amarok, and I want to thank you for your work.
    It was a pity that Amarok didn't work as expected in this area, being as it is a great piece of software

    ReplyDelete
  2. Now that is good for usability. Thank you for this 'minor but major' problem :)

    ReplyDelete