Problem while playing songs after deployment
-
Hi everyone,
I made an application that play diverses song using Qt 5.15.2 on Windows. It works well using QT IDE and now I want to use the executable as a standalone to deploy it on other platforms. My program use the following QT class for play songs: QMediaPlaylist and QMediaPlayer.
I created a dedicated folder containing:
- platforms/qwindows.dll
- audio/qtaudio_windows.dll
- mediaservice/dsengine.dll
- mediaservice/qtmedia_audioengine.dll
- playlistformats/qtmultimedia_m3u.dll
- myProgram.exe
- libgcc_s_seh-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll
- Qt5Gui.dll
- Qt5Multimedia.dll
- Qt5MultimediaQuick.dll
- Qt5MultimediaWidgets.dll
- Qt5Network.dll
- Qt5OpenGL.dll
- Qt5Widgets.dll
The executable run well but each time I need to play a sound, it doesn't work (no sounds) and it crashes after a while.
Any idea on how to solve this ?
Thanks !
PS : right now I testing this on the same platform where I have developed the code
-
Hi everyone,
I made an application that play diverses song using Qt 5.15.2 on Windows. It works well using QT IDE and now I want to use the executable as a standalone to deploy it on other platforms. My program use the following QT class for play songs: QMediaPlaylist and QMediaPlayer.
I created a dedicated folder containing:
- platforms/qwindows.dll
- audio/qtaudio_windows.dll
- mediaservice/dsengine.dll
- mediaservice/qtmedia_audioengine.dll
- playlistformats/qtmultimedia_m3u.dll
- myProgram.exe
- libgcc_s_seh-1.dll
- libstdc++-6.dll
- libwinpthread-1.dll
- Qt5Core.dll
- Qt5Gui.dll
- Qt5Multimedia.dll
- Qt5MultimediaQuick.dll
- Qt5MultimediaWidgets.dll
- Qt5Network.dll
- Qt5OpenGL.dll
- Qt5Widgets.dll
The executable run well but each time I need to play a sound, it doesn't work (no sounds) and it crashes after a while.
Any idea on how to solve this ?
Thanks !
PS : right now I testing this on the same platform where I have developed the code
-
@CLBSII Please try to run windeployqt against your application and then try? In that dedicated folder of yours.
@artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.
But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?
I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.
-
@artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.
But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?
I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.
-
@artwaw ok I tried this in a new folder. It added me a lot a new files, but when I launch the executable, the problem remains the same.
But maybe there is something to do with my code: for operational reasons, I had to put my audio player in a Thread. Maybe it has something to do with this ?
I say that because I tried to do a simple QT application witch just play a song, and it works properly using windeployqt.
@CLBSII said in Problem while playing songs after deployment:
I had to put my audio player in a Thread. Maybe it has something to do with this ?
How did you do this?
Are you sure all class instances used by your player are running in the right thread?