6.4 windeployqt deployed app doesn't start, but works under QtCreator
-
I'm using this script https://github.com/olegantonyan/mpz/blob/master/win/dynamic_win64_qt6_host.sh to build binaries for Windows (Win10 host in VirtualBox, MinGW11, run script in Git bash)
It works with Qt 5 and Qt 6.3.1, but with Qt 6.4.0 resulting binary silently exists upon launch:user@DESKTOP-RKU7FJS MINGW64 ~/Desktop/mpz-1.0.21-win64-qt6-dynamic $ ./mpz.exe user@DESKTOP-RKU7FJS MINGW64 ~/Desktop/mpz-1.0.21-win64-qt6-dynamic $ echo $? 127
strace:
$ strace.exe ./mpz.exe --- Process 9196 created --- Process 9196 loaded C:\Windows\System32\ntdll.dll at 00007ffa26b70000 --- Process 9196 loaded C:\Windows\System32\kernel32.dll at 00007ffa25210000 --- Process 9196 loaded C:\Windows\System32\KernelBase.dll at 00007ffa24530000 --- Process 9196 loaded C:\Windows\System32\msvcrt.dll at 00007ffa25600000 --- Process 9196 loaded C:\Windows\System32\shell32.dll at 00007ffa25750000 --- Process 9196 loaded C:\Windows\System32\msvcp_win.dll at 00007ffa24340000 --- Process 9196 loaded C:\Windows\System32\ucrtbase.dll at 00007ffa243e0000 --- Process 9196 loaded C:\Windows\System32\user32.dll at 00007ffa26860000 --- Process 9196 loaded C:\Windows\System32\win32u.dll at 00007ffa24a90000 --- Process 9196 loaded C:\Windows\System32\gdi32.dll at 00007ffa255c0000 --- Process 9196 thread 6328 created --- Process 9196 loaded C:\Windows\System32\gdi32full.dll at 00007ffa24ac0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Gui.dll at 00007ff9def40000 --- Process 9196 loaded C:\Windows\System32\ole32.dll at 00007ffa26a00000 --- Process 9196 thread 6316 created --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Multimedia.dll at 00007ffa15aa0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Network.dll at 00007ffa15900000 --- Process 9196 loaded C:\Windows\System32\advapi32.dll at 00007ffa26670000 --- Process 9196 loaded C:\Windows\System32\sechost.dll at 00007ffa24f30000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00000282260a0000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00000282260a0000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 thread 2980 created --- Process 9196 loaded C:\Windows\System32\ws2_32.dll at 00007ffa24d10000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00000282260a0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Core.dll at 00007ff9ebe10000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\libgcc_s_seh-1.dll at 00007ffa200a0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Widgets.dll at 00007ff9de8e0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\libstdc++-6.dll at 00007ffa0e9e0000 --- Process 9196 loaded C:\Windows\System32\d3d11.dll at 00007ffa20780000 --- Process 9196 loaded C:\Windows\System32\DWrite.dll at 00007ffa1a1a0000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00000282260a0000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 loaded C:\Windows\System32\dxgi.dll at 00007ffa22b80000 --- Process 9196 loaded C:\Windows\System32\winmm.dll at 00007ffa0c8c0000 --- Process 9196 loaded C:\Windows\System32\mfplat.dll at 00007ffa03f30000 --- Process 9196 loaded C:\Windows\System32\cfgmgr32.dll at 00007ffa244e0000 --- Process 9196 loaded C:\Windows\System32\SHCore.dll at 00007ffa256a0000 --- Process 9196 loaded C:\Windows\System32\combase.dll at 00007ffa26310000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00000282260a0000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Core.dll at 00000282260a0000 --- Process 9196 unloaded DLL at 00000282260a0000 --- Process 9196 loaded C:\Windows\System32\dnsapi.dll at 00007ffa236b0000 --- Process 9196 loaded C:\Windows\System32\IPHLPAPI.DLL at 00007ffa23670000 --- Process 9196 loaded C:\Windows\System32\secur32.dll at 00007ffa1ced0000 --- Process 9196 loaded C:\Windows\System32\winhttp.dll at 00007ffa1d5b0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\libwinpthread-1.dll at 0000000064940000 --- Process 9196 loaded C:\Windows\System32\dwmapi.dll at 00007ffa21db0000 --- Process 9196 loaded C:\Windows\System32\uxtheme.dll at 00007ffa21c30000 --- Process 9196 loaded C:\Windows\System32\rpcrt4.dll at 00007ffa25080000 --- Process 9196 loaded C:\Windows\System32\authz.dll at 00007ffa230b0000 --- Process 9196 loaded C:\Windows\System32\netapi32.dll at 00007ffa19e70000 --- Process 9196 loaded C:\Windows\System32\version.dll at 00007ffa1d8d0000 --- Process 9196 loaded C:\Windows\System32\userenv.dll at 00007ffa24150000 --- Process 9196 loaded C:\Windows\System32\mpr.dll at 00007ffa1d920000 --- Process 9196 loaded C:\Windows\System32\cryptbase.dll at 00007ffa23b70000 --- Process 9196 loaded C:\Windows\System32\netutils.dll at 00007ffa23780000 --- Process 9196 loaded C:\Windows\System32\srvcli.dll at 00007ffa18830000 --- Process 9196 loaded C:\Windows\System32\sspicli.dll at 00007ffa24180000 --- Process 9196 loaded C:\Windows\System32\imm32.dll at 00007ffa24bd0000 --- Process 9196 loaded C:\Windows\System32\bcryptprimitives.dll at 00007ffa24a00000 --- Process 9196 loaded C:\Windows\System32\kernel.appcore.dll at 00007ffa22180000 --- Process 9196 loaded C:\Windows\System32\RTWorkQ.dll at 00007ffa03ea0000 --- Process 9196 loaded C:\Windows\System32\nsi.dll at 00007ffa26850000 --- Process 9196 loaded C:\Windows\System32\windows.storage.dll at 00007ffa22380000 --- Process 9196 loaded C:\Windows\System32\wldp.dll at 00007ffa23c20000 --- Process 9196 loaded C:\Windows\System32\shlwapi.dll at 00007ffa252d0000 --- Process 9196 loaded C:\Windows\System32\profapi.dll at 00007ffa241d0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\platforms\qwindows.dll at 00007ffa0fe00000 --- Process 9196 loaded C:\Windows\System32\comdlg32.dll at 00007ffa254e0000 --- Process 9196 loaded C:\Windows\System32\oleaut32.dll at 00007ffa26780000 --- Process 9196 loaded C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_5.82.19041.1110_none_792d1c772443f647\comctl32.dll at 00007ffa0de80000 --- Process 9196 loaded C:\Windows\System32\wtsapi32.dll at 00007ffa1e2a0000 --- Process 9196 loaded C:\Windows\System32\d3d9.dll at 00007ff9e99e0000 --- Process 9196 loaded C:\Windows\System32\powrprof.dll at 00007ffa24100000 --- Process 9196 loaded C:\Windows\System32\umpdc.dll at 00007ffa240e0000 --- Process 9196 thread 1088 created --- Process 9196 loaded C:\Windows\System32\msctf.dll at 00007ffa25330000 --- Process 9196 thread 6416 created --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\styles\qwindowsvistastyle.dll at 00007ffa16a20000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\imageformats\qgif.dll at 00007ffa1c880000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\imageformats\qico.dll at 00007ffa1c6e0000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\imageformats\qjpeg.dll at 00007ffa15880000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\imageformats\qsvg.dll at 00007ffa1ae30000 --- Process 9196 loaded C:\Users\user\Desktop\mpz-1.0.21-win64-qt6-dynamic\Qt6Svg.dll at 00007ffa15820000 --- Process 9196 thread 4856 created --- Process 9196 loaded C:\Windows\System32\VBoxMRXNP.dll at 00007ffa1d350000 --- Process 9196 loaded C:\Windows\System32\drprov.dll at 00007ffa1cfb0000 --- Process 9196 loaded C:\Windows\System32\winsta.dll at 00007ffa23fd0000 --- Process 9196 loaded C:\Windows\System32\ntlanman.dll at 00007ffa1cf90000 --- Process 9196 loaded C:\Windows\System32\davclnt.dll at 00007ffa1cf70000 --- Process 9196 loaded C:\Windows\System32\davhlpr.dll at 00007ffa1cf60000 --- Process 9196 loaded C:\Windows\System32\wkscli.dll at 00007ffa23420000 --- Process 9196 loaded C:\Windows\System32\cscapi.dll at 00007ffa12d00000 --- Process 9196, exception 000006ba at 00007ffa24564fd9 --- Process 9196 thread 3624 created --- Process 9196 thread 8504 created --- Process 9196 loaded C:\Windows\System32\clbcatq.dll at 00007ffa24fd0000 --- Process 9196 loaded C:\Windows\System32\propsys.dll at 00007ffa1fc60000 --- Process 9196 thread 8504 exited with status 0x0 --- Process 9196 thread 3624 exited with status 0x0 --- Process 9196 thread 5864 created --- Process 9196 loaded C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\comctl32.dll at 00007ffa12960000 --- Process 9196 loaded C:\Windows\System32\WindowsCodecs.dll at 00007ffa1f1f0000 --- Process 9196 loaded C:\Windows\System32\bcrypt.dll at 00007ffa24870000 --- Process 9196 loaded C:\Windows\System32\apphelp.dll at 00007ffa21ab0000 --- Process 9196 loaded C:\Windows\System32\EhStorShell.dll at 00007ffa09690000 --- Process 9196 loaded C:\Windows\System32\setupapi.dll at 00007ffa25ea0000 --- Process 9196 loaded C:\Windows\System32\thumbcache.dll at 00007ffa0a840000 --- Process 9196 loaded C:\Windows\System32\policymanager.dll at 00007ffa1e2c0000 --- Process 9196 loaded C:\Windows\System32\msvcp110_win.dll at 00007ffa23390000 --- Process 9196 thread 6328 exited with status 0xc0000602 --- Process 9196 thread 6796 exited with status 0xc0000602 --- Process 9196 thread 6316 exited with status 0xc0000602 --- Process 9196 thread 2980 exited with status 0xc0000602 --- Process 9196 thread 1088 exited with status 0xc0000602 --- Process 9196 thread 6416 exited with status 0xc0000602 --- Process 9196 thread 5864 exited with status 0xc0000602 --- Process 9196 exited with status 0xc0000602
But if I build and run it under QtCreator it works fine. What's wrong here?
-
Hi, welcome to the forum.
Start your app in Creator under debugger and open the modules window (View->Views->Modules). Sort by module path column and see what dlls are loaded (ignore the ones from System32). See if all of them are present in your app directory after windeployqt runs.
You can also open your exe in Dependencies. It will tell you if any dependent dlls can't be found.
-
Thank you, Chris,
E:\Qt\6.4.0\mingw_64\plugins\multimedia\windowsmediaplugin.dll
seems missing. So I copiedplugins/multimedia/
into deployed folder and now it works. But whywindeployqt
doesn't do this? And why this wasn't the problem in Qt 6.3? I've checked old releases - there's noplugins
dir and they work fine.btw https://github.com/lucasg/Dependencies app doesn't launch either
-
But why windeployqt doesn't do this?
I don't know, apparently some dependency chain changed. Are you actually using anything from the multimedia module?
In any case you can force windeployqt to copy multimedia plugin via command line options.btw https://github.com/lucasg/Dependencies app doesn't launch either
Dependencies.exe is a command line tool. Run DependenciesGui.exe for a graphical interface.
-
Yes, I'm using QtMultimedia - it's audio player so multimedia is a core functionality.
It seems likewindowsmediaplugin.dll
is not linked dynamically to the binary, but loaded at runtime via dlopen or whatever similar on Windows.
In any case you can force windeployqt to copy multimedia plugin via command line options.
How? I see
--no-plugins
option, but nothing related to explicit copy of plugins
Simplecp -R
works though, but it's kind of a hack -
How? I see --no-plugins option, but nothing related to explicit copy of plugins
The help says to just pass the name of the module, so
-multimedia
.