App crashed when deployed on another PC
-
I used
windeployqt.exe
to package the Qt dependencies, and copied all other dlls to the correct location, but the exe crashed on startup.deploy command:
windeployqt --debug --compiler-runtime --no-translations --dir .\deploy qPanorama.exe
.I debugged App with
windbg.exe
on my PC 1 (can run) and on another PC 2 (crashed).part of log without exception on my PC 1:
ModLoad: 00007ffb`85aa0000 00007ffb`85abf000 C:\Windows\SYSTEM32\dhcpcsvc.DLL ModLoad: 00007ffb`85bf0000 00007ffb`85c09000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL [MVC_API:Info] MVGEDEV.ini Config file location: C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\MVGEDEV.iniModLoad: 00007ffb`8a7e0000 00007ffb`8a80c000 C:\Windows\SYSTEM32\DEVOBJ.dll ModLoad: 00007ffb`8b180000 00007ffb`8b1fc000 C:\Windows\System32\WINTRUST.dll ModLoad: 00007ffb`8a360000 00007ffb`8a372000 C:\Windows\SYSTEM32\MSASN1.dll ModLoad: 00007ffb`8a0a0000 00007ffb`8a10a000 C:\Windows\system32\mswsock.dll [MVC_API:Action] MVC_API End !ModLoad: 00007ffa`442b0000 00007ffa`44627000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\platforms\qwindowsd.dll ModLoad: 00007ffb`17a80000 00007ffb`17c28000 C:\Windows\SYSTEM32\d3d9.dll ModLoad: 00007ffb`899d0000 00007ffb`899e4000 C:\Windows\SYSTEM32\WTSAPI32.dll ModLoad: 00007ffb`89980000 00007ffb`899cd000 C:\Windows\SYSTEM32\powrprof.dll ModLoad: 00007ffb`89960000 00007ffb`89973000 C:\Windows\SYSTEM32\UMPDC.dll ModLoad: 00007ffb`8ccc0000 00007ffb`8ce1e000 C:\Windows\System32\MSCTF.dll ModLoad: 00007ffb`8b8f0000 00007ffb`8b9a0000 C:\Windows\System32\clbcatq.dll ModLoad: 00007ffb`7cf00000 00007ffb`7d07e000 C:\Windows\System32\Windows.UI.dll ModLoad: 00007ffb`7cd80000 00007ffb`7cef5000 C:\Windows\System32\Windows.UI.Immersive.dll ModLoad: 00007ffa`d86f0000 00007ffa`d877e000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\styles\qmodernwindowsstyled.dll ModLoad: 00007ffb`5e780000 00007ffb`5e797000 C:\Windows\system32\OnDemandConnRouteHelper.dll ModLoad: 00007ffa`b3090000 00007ffa`b3a2e000 C:\Windows\system32\DriverStore\FileRepository\nvtf.inf_amd64_da35b409613b76a0\nvcuda64.dll ModLoad: 00007ffb`835b0000 00007ffb`835e2000 C:\Windows\SYSTEM32\cryptnet.dll ModLoad: 00007ffb`833c0000 00007ffb`83522000 C:\Windows\SYSTEM32\drvstore.dll ModLoad: 00007ffb`8a3f0000 00007ffb`8a440000 C:\Windows\SYSTEM32\wldp.dll ModLoad: 00007ffb`7ede0000 00007ffb`7f595000 C:\Windows\SYSTEM32\nvapi64.dll ModLoad: 00007ffa`3ecc0000 00007ffa`442ac000 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\cudnn_ops_infer64_8.dll ModLoad: 00007ffa`02860000 00007ffa`24eb6000 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\cudnn_cnn_infer64_8.dll [MVC_API:Action] MVC_ReScanDevice Start![MVC_API:Action] MVC_ReScanDevice Over!ModLoad: 00007ffb`7c9d0000 00007ffb`7ca8d000 C:\Windows\System32\DriverStore\FileRepository\nvtf.inf_amd64_da35b409613b76a0\nvldumdx.dll ModLoad: 00007ffb`8cc80000 00007ffb`8cc9f000 C:\Windows\System32\imagehlp.dll ModLoad: 00007ffb`8a300000 00007ffb`8a31b000 C:\Windows\SYSTEM32\CRYPTSP.dll ModLoad: 00007ffb`89b80000 00007ffb`89bb7000 C:\Windows\system32\rsaenh.dll ModLoad: 00007ffb`037b0000 00007ffb`066a6000 C:\Windows\System32\DriverStore\FileRepository\nvtf.inf_amd64_da35b409613b76a0\nvd3dumx.dll ModLoad: 00007ffb`81380000 00007ffb`813c9000 C:\Windows\SYSTEM32\directxdatabasehelper.dll ModLoad: 00007ffb`87720000 00007ffb`87735000 C:\Windows\SYSTEM32\resourcepolicyclient.dll ModLoad: 00007ffb`54720000 00007ffb`5477e000 C:\Windows\system32\dataexchange.dll ModLoad: 00007ffb`7eb00000 00007ffb`7eda6000 C:\Windows\system32\twinapi.appcore.dll ModLoad: 00007ffb`795b0000 00007ffb`796f3000 C:\Windows\SYSTEM32\textinputframework.dll ModLoad: 00007ffb`6d420000 00007ffb`6d448000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\imageformats\qgifd.dll ModLoad: 00007ffb`6d3f0000 00007ffb`6d419000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\imageformats\qicod.dll ModLoad: 00007ffa`aaa80000 00007ffa`aabd5000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\imageformats\qjpegd.dll ModLoad: 00007ffb`5f9d0000 00007ffb`5f9ef000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\imageformats\qsvgd.dll ModLoad: 00007ffa`a9ad0000 00007ffa`a9c2e000 C:\Users\Void\Desktop\Grad\0430-Infrared\QtApp\qPanorama\cmake-build-debug-msvc\deploy\Qt6Svgd.dll
part of log with exception on another PC 2:
ModLoad: 00007fff`3d760000 00007fff`3d77f000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL ModLoad: 00007fff`3d7a0000 00007fff`3d7b9000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL [MVC_API:Info] MVGEDEV.ini Config file location: C:\Users\dinghuan\Desktop\Infrared Monitor - Debug\MVGEDEV.iniModLoad: 00007fff`42250000 00007fff`4227c000 C:\WINDOWS\SYSTEM32\DEVOBJ.dll ModLoad: 00007fff`42d90000 00007fff`42e0c000 C:\WINDOWS\System32\WINTRUST.dll ModLoad: 00007fff`421e0000 00007fff`421f2000 C:\WINDOWS\SYSTEM32\MSASN1.dll ModLoad: 00007fff`41a00000 00007fff`41a6a000 C:\WINDOWS\system32\mswsock.dll [MVC_API:Action] MVC_API End !ModLoad: 00007ffe`428a0000 00007ffe`42c17000 C:\Users\dinghuan\Desktop\Infrared Monitor - Debug\platforms\qwindowsd.dll ModLoad: 00007fff`41330000 00007fff`41344000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll ModLoad: 00007ffe`d5e80000 00007ffe`d6028000 C:\WINDOWS\SYSTEM32\d3d9.dll ModLoad: 00007fff`41da0000 00007fff`41ded000 C:\WINDOWS\SYSTEM32\powrprof.dll ModLoad: 00007fff`41d80000 00007fff`41d93000 C:\WINDOWS\SYSTEM32\UMPDC.dll ModLoad: 00007fff`44ad0000 00007fff`44c2e000 C:\WINDOWS\System32\MSCTF.dll ModLoad: 00007fff`432e0000 00007fff`43390000 C:\WINDOWS\System32\clbcatq.dll ModLoad: 00007fff`39430000 00007fff`395ae000 C:\Windows\System32\Windows.UI.dll ModLoad: 00007fff`36ef0000 00007fff`37065000 C:\Windows\System32\Windows.UI.Immersive.dll ModLoad: 00007ffe`cb210000 00007ffe`cb29e000 C:\Users\dinghuan\Desktop\Infrared Monitor - Debug\styles\qmodernwindowsstyled.dll ModLoad: 00007fff`13c10000 00007fff`13c27000 C:\WINDOWS\system32\OnDemandConnRouteHelper.dll (3ec4.2c84): C++ EH exception - code e06d7363 (first chance) (3ec4.2c84): C++ EH exception - code e06d7363 (!!! second chance !!!)
App was build with: cmake 3.28.5, Qt 6.7.3 (msvc2022_64), OpenCV 4.7.0, CUDA 11.8, Windows 11 23H2
Target Platform: Windows 11 23H2
Does the problem exist on
qmodernwindowsstyled.dll
I guess? -
Then remove it and see if it no longer crashes.
-
Then remove it and see if it no longer crashes.
@Christian-Ehrlicher It still crashed, skipped the
qmodernwindowsstyled.dll
.ModLoad: 00007ffe`42510000 00007ffe`42887000 C:\Users\dinghuan\Desktop\Infrared Monitor - Debug\platforms\qwindowsd.dll ModLoad: 00007fff`41330000 00007fff`41344000 C:\WINDOWS\SYSTEM32\WTSAPI32.dll ModLoad: 00007ffe`d5e80000 00007ffe`d6028000 C:\WINDOWS\SYSTEM32\d3d9.dll ModLoad: 00007fff`41da0000 00007fff`41ded000 C:\WINDOWS\SYSTEM32\powrprof.dll ModLoad: 00007fff`41d80000 00007fff`41d93000 C:\WINDOWS\SYSTEM32\UMPDC.dll ModLoad: 00007fff`44ad0000 00007fff`44c2e000 C:\WINDOWS\System32\MSCTF.dll ModLoad: 00007fff`432e0000 00007fff`43390000 C:\WINDOWS\System32\clbcatq.dll ModLoad: 00007fff`39430000 00007fff`395ae000 C:\Windows\System32\Windows.UI.dll ModLoad: 00007fff`36ef0000 00007fff`37065000 C:\Windows\System32\Windows.UI.Immersive.dll ModLoad: 00007fff`13c10000 00007fff`13c27000 C:\WINDOWS\system32\OnDemandConnRouteHelper.dll (2bc4.1988): C++ EH exception - code e06d7363 (first chance) (2bc4.1988): C++ EH exception - code e06d7363 (!!! second chance !!!) KERNELBASE!RaiseException+0x6c: 00007fff`42a101dc 0f1f440000 nop dword ptr [rax+rax]
-
So I would say - use a debugger and see where it crashes.
-
So I would say - use a debugger and see where it crashes.
@Christian-Ehrlicher emm, that's the problem, when the code is running on my PC 1, it's nothing unusual, debugger cannot find any problem, now I want to make the exe work on another PC 2 without development environments, it crashes, PC 2 has no Qt, opencv or even an IDE.
-
Then install one
-
Any professional app worth its salt has a mechanism to create core dumps (mini dump files inWindows parlance). Then you build your executable with debug symbols enabled and when the app crashes on 3rd party machine you can do post mortem analysis based on the minidum and the symbol files.