Version: (using KDE 4.2.2) Compiler: gcc 4.3 OS: Linux Installed from: Compiled From Sources When Phonon::MediaObject::play() tries to open a non-existent audio file, debug messages from KioMediaStreamPrivate show an error "The file or folder <...filename...> does not exist.". But sometimes, although the MediaObject gets a signal that its state has changed to Phonon::ErrorState, the error text returned by MediaObject::errorString() is empty. Other times, the correct error text is returned. It seems to work about half of the time, so it's presumably some timing or sequencing issue that prevents it working reliably. In the debug output below which shows the sequence of events, AudioThread::playStateChanged(Phonon::State) is a slot which is called by the MediaObject::stateChanged(Phonon::State, Phonon::State) signal. It receives the change in MediaObject::state() to Phonon::ErrorState, but the error text which it tries to retrieve is empty. Later on, before deleting the MediaObject, the state has returned to Phonon::LoadingState and the errorString() still returns an empty string (which may well be by design, of course). kalarm(5627)/phonon (KDE plugin) Phonon::KioMediaStream::KioMediaStream: kalarm(5627)/phonon (KDE plugin) Phonon::KioMediaStream::reset: kalarm(5627)/phonon (KDE plugin) Phonon::KioMediaStream::reset: kalarm(5627)/kio (Slave) KIO::Slave::createSlave: createSlave "file" for KUrl("file:///home/fanisatt/Swallows of April_fin.wav") kalarm(5627)/kio (KIOConnection) KIO::ConnectionServer::listenForRemote: Listening on "local:/tmp/ksocket-david/kalarmTJ5627.slave-socket" kalarm(5627)/kio (KIOJob) KIO::SlaveInterface::dispatch: error 111 "/home/fanisatt/Swallows of April_fin.wav" kalarm(5627)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamResult: KIO Job error: "The file or folder /home/fanisatt/Swallows of April_fin.wav does not exist." kalarm(5627)/phonon (KDE plugin) Phonon::KioMediaStreamPrivate::_k_bytestreamResult: KIO Job is done (will delete itself) and d->kiojob reset to 0 kalarm(5627) AudioThread::playStateChanged: STATE CHANGE -> 5 kalarm(5627) AudioThread::playStateChanged: ERROR: ""
It turns out that in the playStateChanged() slot which is triggered by MediaObject::stateChanged(), MediaObject::state() shows Phonon::LoadingState and not Phonon::ErrorState when the text returned by MediaObject::errorString() is empty - even though the new state supplied as a parameter to the slot is Phonon::ErrorState. This seems to indicate that the MediaObject state (and error text) changes between the time the signal is emitted and the slot being called. Note that in my application, the MediaObject is in the same thread as the playStateChanged() slot, so the problem seems to lie in Phonon and its threads.
Marked as JJ
Is this still valid for KDE SC 4.4.2?
Closing for lack of feedback. Please only reopen if this is reproducible in KDE SC 4.4.5 or later.