windeployqt.exe doesn't create a working package
-
Hi, I have the following problem:
I am working on an application and for testing purposes I need to deploy it onto Windows (I'm developing it in QT Creator on Windows). The application works correctly when ran from Creator. Shouldn't be too difficult, right?
Well, I've tried building it in release mode and then running windeployqt.exe on the executable for my application.Right now when I run the .exe for my application it starts a process but no window shows up and the applciation crashes after a while. When it crashes it says that the Fault Module is Qt5Core.dll and the exception code is c0000005 (Access Violation).
There have been some issues that I've been able to solve (it packaged the wrong libstdc++-6.dll along the other .dll's, but I've fixed that already) and ones I haven't.
I've spent a good ammount of time going through dump files (created manually when the application crashes) and the following messages show up in them:'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\myapplication.exe'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\KERNELBASE.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Core.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\advapi32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msvcrt.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\sechost.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\rpcrt4.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libgcc_s_dw2-1.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libwinpthread-1.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\mpr.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ole32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\gdi32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\user32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\lpk.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\usp10.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\shell32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\shlwapi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ws2_32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\nsi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libstdc++-6.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Gui.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Multimedia.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Network.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\crypt32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msasn1.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\dnsapi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\winnsi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Qml.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Quick.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\Qt5Widgets.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\fftw3.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\libusb-1.0.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\imm32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msctf.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\profapi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\platforms\qwindows.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\oleaut32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\winmm.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\CRYPTBASE.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\uxtheme.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Users\username\Desktop\deploy\audio\qtaudio_windows.dll'. Module was built without symbols. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\clbcatq.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\devenum.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\setupapi.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\cfgmgr32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\devobj.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ntmarta.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\Wldap32.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\MMDevAPI.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\propsys.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\wdmaud.drv'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\ksuser.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\avrt.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\wintrust.dll'. Cannot find or open the PDB file. 'myapplication (2).DMP' (Minidump): Loaded 'C:\Windows\System32\msdmo.dll'. Cannot find or open the PDB file.
In another (smaller and automatically created by windows 7) dump file the following messages can be read:
'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\myapplication.exe'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ntdll.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\kernel32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\KERNELBASE.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Core.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\advapi32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msvcrt.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\sechost.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\rpcrt4.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libgcc_s_dw2-1.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libwinpthread-1.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\mpr.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ole32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\gdi32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\user32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\lpk.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\usp10.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\shell32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\shlwapi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ws2_32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\nsi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libstdc++-6.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Gui.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Multimedia.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Network.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\crypt32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msasn1.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\dnsapi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\IPHLPAPI.DLL'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\winnsi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Qml.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Quick.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\Qt5Widgets.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\fftw3.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\libusb-1.0.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\imm32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msctf.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\profapi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\platforms\qwindows.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\oleaut32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\winmm.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\CRYPTBASE.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\uxtheme.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Users\username\Desktop\deploy\audio\qtaudio_windows.dll'. Module was built without symbols. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\clbcatq.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\devenum.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\setupapi.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\cfgmgr32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\devobj.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ntmarta.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\Wldap32.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\MMDevAPI.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\propsys.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\wdmaud.drv'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\ksuser.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\avrt.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\wintrust.dll'. No matching binary found. 'WERA104.tmp.mdmp' (Minidump): Loaded '*C:\Windows\System32\msdmo.dll'. No matching binary found. Unhandled exception at 0x68A0DF45 (Qt5Core.dll) in WERA104.tmp.mdmp: 0xC0000005: Access violation reading location 0x00000028.
In theory I could find all the DLL's that can not be found in the minidump and put them next to my executable, however I think there is an underlying issue that perhaps someone could help me fix.
Thanks in advance!
EDIT: I'm using MinGW 49_32
-
Hi kalmant,
you said:
it packaged the wrong libstdc++-6.dll
Maybe a silly question, but are you sure you call the rigth windeployqt.exe. You have to call the one in the bin dir of the kit you are using to build your application.
Second make sure you don´t have any path to a MinGW installation in your environment variables. -
@kalmant said:
I had had another MinGW installation in my path
That often causes problems.
What happens if you:
- Remove all MinGW from your PATH
- Delete all your compiled code and re-compile from scratch
3 Deploy and run?
?
Yeah, it works fine when ran in realease mode in Creator.
- Run your program from Qt Creator
- Use ListDLLs to see the exact paths of all loaded DLLs
- Close your program.
- Run your program from the deployment folder (on the same computer)
- When the crash message appears, don't close the message. Use ListDLLs again.
- Compare the DLL paths.
-
Hi,
Did you use the
--qmldir
parameter of windeployqt when calling it on your application ?