Failed to create D3D11 swapchain: The application made a call that is invalid
-
I'm trying to deploy a qt application on my windows server 2012 R2. I've developed app on my windows 10 and it worked fine on the developement machine but it doesn't show gui on my Windows server.
The problem is related to loading directX dlls I suppose. Here is the screen shot of the debugView on my windows server.
ListDlls shows that on windows server, that app couldn't find
C:\WINDOWS\SYSTEM32\d3d11.dll because its not even there!I've tried to copy the d3d11.dll from my development machine to server but app complains about missing api-ms-win-core-heap-l2-1-0.dll and the list goes if i copy individual dlls.
What could be the possible solution ?
-
@hskoglund Thanks for the reply. I installed the "Desktop Experience" on my server and now the C:\WINDOWS\SYSTEM32\d3d11.dll is available on my server but the same error message appears unfortunately.
-
Maybe rhe server needs a reboot also…
-
@hskoglund Yes, I've rebooted the server after installation.
Here the listdll output chunk which shows d3d11.dll is loaded now but the problem somehow persists. -
Hmmm it could be tjhat Windows Server 2012 R2 is not supported by Qt 6’.5 :-(
Ik that case: either upgrade the server or downgrade your app to Qt5. -
@hskoglund I somehow find a lame solution. Here is what i did,
Set QT_QUICK_BACKEND to software in my main(..)
QQuickWindow::setSceneGraphBackend("software");
set the following environment variable on my server i.e.
QSG_RHI_PREFER_SOFTWARE_RENDERER=1
It work for now atleast.
-
Any solution you can walk away from, is a good one :-)
P.S Hopefully this will help others having the same probllem.
1/8