I am currently writing an application with build-in audio player.
When I setup QMediaPlayer
, I (always) get the following error:
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
There are some google results about that, but I did not find any solution to fix it. Please note that I do not use jack.
So far I can live with that error message, but there is a much worse problem. Most of the time, the application works fine and does the expected but sporadically it freezes. The whole system freezes. I can turn the mouse around (with a poor frame rate) but I cannot click on anything or interact with any other program. Even switching to a text terminal with Ctrl+Alt+F1
does not help which make me think there should be an issue with a driver or a kernel module.
I tried mp3
and vorbis
, with and without debugger, in debug and in release mode. Always the same.
There is no additional warning, error etc.
The error also occurs when starting the application from console (an executable that ran just before without any problems).
System:
Linux t420s 3.16-3-amd64 #1 SMP Debian 3.16.5-1 (2014-10-10) x86_64 GNU/Linux
Qt 5.1.1, C++11
qmake:
qmake .../CAN.pro -r -spec linux-g++-64 CONFIG+=debug
The part of code causing the issue:
QMediaPlayer* _player = 0;
_player = new QMediaPlayer(this);
...
QFile tmpFile(filename);
tmpFile.open(QIODevice::ReadWrite);
tmpFile.write(_mediaFile);
_player->setMedia(QUrl::fromLocalFile(filename)); // <-- this line causes the freezing
The last system update/upgrade was on November 9, 2014.
Btw, the whole project is publicly hosted on github. I also asked the same question here but did not receive any answer. Sorry for multipost.
One or two months ago, I had to reinstall my system for irrelevant reasons. I decided to install Ubunutu 14.04 instead of Debian.
Since then, the error did not show up again. So I guess this issue is solved. Although I'd be glad to know the reasons...