Bug 290726 - Kalarm sounds play sometimes, sometimes don't
Summary: Kalarm sounds play sometimes, sometimes don't
Status: RESOLVED WORKSFORME
Alias: None
Product: Phonon
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 4.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2012-01-05 18:15 UTC by James K. Gruetzner
Modified: 2018-10-27 03:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James K. Gruetzner 2012-01-05 18:15:32 UTC
Version:           2.4.11 (using KDE 4.6.5) 
OS:                Linux

Sometimes in kalarm, when the alarm activates, it will play the sound from the 
associated file.  Sometimes it won't.  I can test a given alarm (using the Try 
button in the Edit Display Alarm - KAlarm dialog box) several times in a row, and sometimes the music file will play while other times it will be silent.

When running KAlarm from the command line, the following error shows up when the alarm does not play:
-------------------------
kalarm(25849)/kio (Scheduler) KIO::SchedulerPrivate::doJob: KIO is not thread-
safe. 
QObject::startTimer: QTimer can only be used with threads started with QThread
        :
<repeated six additional times>
        :
kalarm(25849)/kio (KIOJob) KIO::SimpleJob::doKill: KIO::FileJob(0x7f7c1001e980) 
This is overkill. 
-------------------------
(The PID is 25849.  There is an additional error message that occurs when the pop-up window is closed, but that occurs whether or not the sound plays.).

This error occurs with both .mp3 and .ogg files, and with gstreamer, xine, or VLC selected as the Phonon back-end.  When the sound file does not play, there is no indication in the pavucontrol Output Devices tab that the signal is making it that far.  

Reproducible: Sometimes

Steps to Reproduce:
In KAlarm, select an alarm which plays a sound, and double-click to edit.
In the edit dialog box, click the Try button.


Actual Results:  
Alarm box pops up.  Sometimes the sound plays, sometimes it doesn't.

Expected Results:  
Alarm box pops up and sound plays.

Fedora 15
Dell Optiplex 755 (64 bit)

A coworker has almost an identical set-up (KAlarm/KDE/Fedora) and has no problem. This all leads me to believe that there is a race condition occurring.
Comment 1 ymajeed 2012-02-06 22:02:58 UTC
I can confirm this problem, I found that when I have two audio alarms schedules (in order to replace "snooze" function) the first alarm will play, but when I stop it the second alarm does not work
Comment 2 David Jarvie 2012-02-23 23:10:30 UTC
KAlarm only uses one thread class, and it is a QThread, so it looks like this bug must be in library code - presumably in Phonon somewhere, or in some library called by Phonon.

I've also sometimes noticed the error

"QObject::startTimer: QTimer can only be used with threads started with QThread"

when KAlarm attempts to open the sound file chooser dialog (in kalarm/soundpicker.cpp, function SoundPicker::browseFile()). The relevant code in the function is:

QString dir = KGlobal::dirs()->findResourceDir("sound", "KDE-Sys-Warning.ogg");
QString filter = Phonon::BackendCapabilities::availableMimeTypes().join(" ");

Then KFileDialog is called. However, when the error message appears, the program hangs. I haven't seen this hang occurring when other file dialogs are invoked, so I suspect that it may be the Phonon call to availableMimeTypes() which hangs. This is still to be confirmed, though. Also, this hang may well only happen the first time this code is executed in a session, even if KAlarm is quit and restarted within the session.


As for comment #1, that is a different issue which doesn't belong in this bug report.
Comment 3 Myriam Schweingruber 2013-04-13 09:01:00 UTC
Is this still valid with Phonon 4.6.0 or current git and a recent KDE 4.10.x?
Comment 4 Andrew Crouthamel 2018-09-24 02:16:17 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Andrew Crouthamel 2018-10-27 03:36:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!