Unsolved Can't play video on windows xp
-
-
@LinArcX
Running through qt-creator works, didn't you say that?
So we don't need the output for that, we need the output when mediaplayer cannot work, that means running the application from your deployed directory .
But there're two different situations:- Running the application without qt-creator on the same machine you have your qt-creator. Does that work?. Even not, I'm sure this will eventually work, as long as it can loaded the right plugins just as running from qt-creator.
- Running the application on your xp machine. This would be different with running on windows 7 since the default mediaplayer plugin of msvc builds on vista+ is WMF, but WMF may be not available on xp. So it would also be helpful to see what plugins does it load.
-
So we don't need the output for that, we need the output when mediaplayer cannot work...
My mistake. sorry.
- Running the application without qt-creator on the same machine you have your qt-creator. Does that work?
Surprisingly yes, I didn't know why this time it worked!
(Also i'v noticed that setting
QT_DEBUG_PLUGINS=1
and then run my.exe
file doesn't show any debug output info. i don't know why)- Running the application on your xp machine...
I opened cmd.exe in deployed directory and:
SET PATH=QT_DEBUG_PLUGINS=1;%PATH%
And run my application:
MyQtWidgetsTest.exe > output.txt 2>&1
But it didn't generate
output.txt
file. -
@LinArcX
It uses OutputDebugString on windows instead of stdout/stderr, so the output can't be redirected.
One solution is to use DebugView.
(BTW, your above command to set environment variable is not right.)
Open DebugView, then in cmd.exe:SET QT_DEBUG_PLUGINS=1 MyQtWidgetsTest.exe
The output will be shown in DebugView.
-
-
@LinArcX
I think the key point isQLibraryPrivate::loadPlugin failed on "Z:/workspace/c++/qt/build-AtmQtWidgetsTest-Desktop_Qt_5_6_3_MSVC2013_32_bit-Release/release/mediaservice/dsengine.dll" : "Cannot load library Z:\\workspace\\c++\\qt\\build-AtmQtWidgetsTest-Desktop_Qt_5_6_3_MSVC2013_32_bit-Release\\release\\mediaservice\\dsengine.dll: The specified module could not be found.
That usually means there're some dependency dlls missing so the plugin dll cannot be loaded.
Try using DependencyWalker to open dsengine.dll to check the dependencies.
Maybe xp needs to install directx? I'm not sure... -
Hmmm.. Interesing. This is the output of dependency walker on
dsengine.dll
:- c:\windows\system32\GDI32.DLL
- c:\windows\system32\MF.DLL
- c:\windows\system32\MFPLAT.DLL
- c:\windows\system32\D3D9.DLL
- c:\windows\system32\DXVA2.DLL
- c:\windows\system32\WINMM.DLL
- c:\windows\system32\EVR.DLL
- c:\windows\system32\OLE32.DLL
- c:\windows\system32\OLEAUT32.DLL
- c:\tools\neovim\neovim\bin\QT5WIDGETS.DLL
- c:\tools\neovim\neovim\bin\QT5GUI.DLL
- c:\tools\neovim\neovim\bin\QT5CORE.DLL
- c:\windows\system32\USER32.DLL
- c:\windows\system32\MSVCP120.DLL
- c:\windows\system32\MSVCR120.DLL
- c:\windows\system32\KERNEL32.DLL
So, yes. Seems it depends on
D3D9.dll
that is parts of DirectX. But I installed DirectX 9 on windows xp and checked thatd3d9.dll
exists inc:\windows\system32
.Edit: I've noticed that except
mf.dll
andmfplat.dll
other dlls exists inc:\windows\system32
. -
@LinArcX
Well, this is not how we usually use dependency walker.
In the middle list area, check the yellow icons for missing dlls and red icons for dlls that missing functions.
Some can be ignored referring to https://www.dependencywalker.com/faq.htmlEdit: If it depends on mf.dll and mfplat.dll, that can be the problem. Maybe your compiling links newer DX libs that not supporting xp.
Edit2: I've searched on google and others say that if mf.dll and mfplat.dll are lazy loaded, then that can also be ignored. -
@Bonnie
Lazy loaded? What that means?I download them from the internet and copy in system directory.
But nothing changed.
-
@Bonnie said in Can't play video on windows xp:
In the middle list area, check the yellow icons for missing dlls and red icons for dlls that missing functions.
-
@LinArcX
Lazy loaded dlls would have a hourglass mark with the icon, like MPR.DLL / IESHIMS.DLL in your picture.
Your MF.DLL and MFPLAT.DLL seems to be direct linked, also your D3D9.dll is red so it may miss functions.
I would guess it is due to the DX lib when you compile Qt, as I said.
I don't have any 5.6.3 dlls on my machine but I have a deployed application of 5.5.1. Checking by dependency walker, the official prebuilt msvc2013 dsengine.dll of 5.5.1 doesn't depend on mf.dll and mfplat.dll directly. -
Maybe your compiling links newer DX libs that not supporting xp. I would guess it is due to the DX lib when you compile Qt, as I said.
You mean i should install Directx9 on my windows7, remove all other DirectX versions and compile qt5.6.3 again?
-
@LinArcX
You may be able to compile only the dsengine plugin.
But I don't know how to make sure you link the xp supported DX lib, since I don't target xp for at least 5 years... -
-
Hi, one other thing I saw in the dependency walker's output, it wants the Qt files from another Qt directory on your XP machine:
c:\tools\neovim\neovim\binMake sure that this other version exists and is also Qt 5.6.3 Release for MSVC 2013.
-
@hskoglund
Hello. I have some questions:- Why application loads these
.dlls
from that weird directory instead of current directory of my application? (I usedwindeployqt
) - Lets say, i fixed it. Do it fix main issue?(Showing video)
- Why application loads these
-
@LinArcX
Hi
1: Ask Windows :) It is its run time loader that controls this.
2: It could fix it. However, the normal effect of mixing Qt version is crashes so
dont get to much hope up. -
@mrjj I mean why it didn't look in current directory first, if it looked why doesn't load it? Since those dlls exists beside main exe file.
I noticed that on windows xp that doesn't have this directory(
c:\tools\neovim\neovim\bin\
), DependencyWalker complains that it can't find dlls:
` -
@LinArcX
Well back in the Xp days they didn't load better i guess.
In the newer version of windows, you can add a manifest file to tweaking it and at some point they also allowed
side by side loading of Dlls with same name etc.
https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-orderwell (c:\tools\neovim\neovim\bin) seems just to be
https://github.com/neovim/neovim
but it does uses Qt for GUI .Hmm so the DSENGINE cannot find its support DLLS ?
those missing files are in your app folder ?Is there a reason you cant use a virtual machine with Xp (or real pc ) to install Qt5.6
and what ever compiler you wish and simply compile and xp version for xp.
And compile a win 7+ on win 7 ?
Im not 100% sure you can have a one .exe that works on both as the backend changed alot. -
you can add a manifest file to tweaking it and at some point they also allowed side by side loading of Dlls with same name etc.
It works on xp?
side by side loading of Dlls with same name etc.> those missing files are in your app folder ?
Exactly.
Is there a reason you cant use a virtual machine with Xp (or real pc ) to install Qt5.6 and what ever compiler you wish and simply compile and xp version for xp.
I tried to compile qt 5.5.0 on windos xp.(It's a virtualbox machine). It complains about some functions that only exists on x64 architecture.
Im not 100% sure you can have a one .exe that works on both as the backend changed alot.
So, you mean i should compile whole application in each os separately?