Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

win32 static and Run app crash



  • Qt: 5.13 - 5.15

    configure -debug -static -no-opengl -nomake examples -nomake tests -skip qtwebengine -opensource -prefix "D:\third_party\Qt\Qt-5.13.0\MD\Debug" -no-openssl
    

    Win32-msvc
    Vs2019

    and use cmake build a exe.

    ************* Path validation summary **************
    Response                         Time (ms)     Location
    Deferred                                       srv*
    OK                                             C:\SymbolCache
    Symbol search path is: srv*;C:\SymbolCache
    Executable search path is: 
    ModLoad: 003c0000 01b58000   xxx.exe
    ModLoad: 77670000 7780a000   ntdll.dll
    ModLoad: 760f0000 761d0000   C:\Windows\SysWOW64\KERNEL32.DLL
    ModLoad: 76960000 76b5e000   C:\Windows\SysWOW64\KERNELBASE.dll
    ModLoad: 74d90000 74e2f000   C:\Windows\SysWOW64\apphelp.dll
    ModLoad: 76090000 760ee000   C:\Windows\SysWOW64\WS2_32.dll
    ModLoad: 76fd0000 7708b000   C:\Windows\SysWOW64\RPCRT4.dll
    ModLoad: 749d0000 749e3000   C:\Windows\SysWOW64\NETAPI32.dll
    ModLoad: 749b0000 749ce000   C:\Windows\SysWOW64\USERENV.dll
    ModLoad: 74970000 749a2000   C:\Windows\SysWOW64\IPHLPAPI.DLL
    ModLoad: 74e40000 74e60000   C:\Windows\SysWOW64\SspiCli.dll
    ModLoad: 754e0000 7559f000   C:\Windows\SysWOW64\msvcrt.dll
    ModLoad: 750e0000 751ff000   C:\Windows\SysWOW64\ucrtbase.dll
    ModLoad: 74e30000 74e3a000   C:\Windows\SysWOW64\CRYPTBASE.dll
    ModLoad: 753c0000 7541f000   C:\Windows\SysWOW64\bcryptPrimitives.dll
    ModLoad: 75a70000 75a8b000   C:\Windows\SysWOW64\profapi.dll
    ModLoad: 73910000 73918000   C:\Windows\SysWOW64\VERSION.dll
    ModLoad: 75960000 759d6000   C:\Windows\SysWOW64\sechost.dll
    ModLoad: 75670000 75807000   C:\Windows\SysWOW64\USER32.dll
    ModLoad: 762e0000 762f7000   C:\Windows\SysWOW64\win32u.dll
    ModLoad: 76930000 76951000   C:\Windows\SysWOW64\GDI32.dll
    ModLoad: 76c20000 76d7b000   C:\Windows\SysWOW64\gdi32full.dll
    ModLoad: 755a0000 7561c000   C:\Windows\SysWOW64\msvcp_win.dll
    ModLoad: 75a90000 76009000   C:\Windows\SysWOW64\SHELL32.dll
    ModLoad: 76be0000 76c1b000   C:\Windows\SysWOW64\cfgmgr32.dll
    ModLoad: 75430000 754b4000   C:\Windows\SysWOW64\shcore.dll
    ModLoad: 74e60000 750d5000   C:\Windows\SysWOW64\combase.dll
    ModLoad: 76360000 76926000   C:\Windows\SysWOW64\windows.storage.dll
    ModLoad: 77090000 77109000   C:\Windows\SysWOW64\advapi32.dll
    ModLoad: 76d80000 76dc3000   C:\Windows\SysWOW64\powrprof.dll
    ModLoad: 76010000 7601d000   C:\Windows\SysWOW64\UMPDC.dll
    ModLoad: 75200000 75244000   C:\Windows\SysWOW64\shlwapi.dll
    ModLoad: 76020000 7602f000   C:\Windows\SysWOW64\kernel.appcore.dll
    ModLoad: 75620000 75633000   C:\Windows\SysWOW64\cryptsp.dll
    ModLoad: 76ed0000 76fc7000   C:\Windows\SysWOW64\ole32.dll
    ModLoad: 74ac0000 74ae4000   C:\Windows\SysWOW64\WINMM.dll
    ModLoad: 7aad0000 7ab86000   C:\Windows\SysWOW64\MSVCP140D.dll
    ModLoad: 7aa90000 7aaad000   C:\Windows\SysWOW64\VCRUNTIME140D.dll
    ModLoad: 79e20000 79f95000   C:\Windows\SysWOW64\ucrtbased.dll
    ModLoad: 739e0000 73a03000   C:\Windows\SysWOW64\winmmbase.dll
    ModLoad: 01ba0000 01bc3000   C:\Windows\SysWOW64\WINMMBASE.dll
    ModLoad: 01bd0000 01bf3000   C:\Windows\SysWOW64\winmmbase.dll
    ModLoad: 73e70000 73e7b000   C:\Windows\SysWOW64\NETUTILS.DLL
    ModLoad: 65670000 6568c000   C:\Windows\SysWOW64\SRVCLI.DLL
    (344c.f64): Break instruction exception - code 80000003 (first chance)
    eax=00000000 ebx=01d4a000 ecx=52a60000 edx=00000000 esi=021b2b90 edi=7767688c
    eip=7771eaa2 esp=01eff418 ebp=01eff444 iopl=0         nv up ei pl zr na pe nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
    ntdll!LdrInitShimEngineDynamic+0x6e2:
    7771eaa2 cc              int     3
    0:000> kp
     # ChildEBP RetAddr  
    WARNING: Stack unwind information not available. Following frames may be wrong.
    00 01eff444 77719266 ntdll!LdrInitShimEngineDynamic+0x6e2
    01 01eff6a4 776c1dd1 ntdll!RtlCaptureStackContext+0x20076
    02 01eff6fc 776c1cc1 ntdll!LdrInitializeThunk+0x121
    03 01eff708 00000000 ntdll!LdrInitializeThunk+0x11
    0:000> g
    ModLoad: 76bb0000 76bd5000   C:\Windows\SysWOW64\IMM32.DLL
    Breakpoint 5 hit
    eax=00000008 ebx=01d4a000 ecx=01eff8ac edx=7f736466 esi=003f3a55 edi=003f3a55
    eip=0052cbf9 esp=01eff868 ebp=01eff88c iopl=0         nv up ei pl nz na po nc
    cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000202
    pgTunnelAppQt!QByteArray::reserve+0x9:
    0052cbf9 8b45fc          mov     eax,dword ptr [ebp-4] ss:002b:01eff888=01eff8ac
    0:000> kp
     # ChildEBP RetAddr  
    00 01eff88c 0052cb3b pgTunnelAppQt!QByteArray::reserve(int asize = 0n8)+0x9 [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\corelib\tools\qbytearray.h @ 513] 
    01 01eff8b0 0052cad8 pgTunnelAppQt!QMetaTypeIdQObject<QWidget *,8>::qt_metatype_id(void)+0x4b [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\corelib\kernel\qmetatype.h @ 1836] 
    02 01eff8b8 0052c2d8 pgTunnelAppQt!QMetaTypeId2<QWidget *>::qt_metatype_id(void)+0x8 [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\corelib\kernel\qmetatype.h @ 1663] 
    03 01eff8c0 0052c2e8 pgTunnelAppQt!qMetaTypeId<QWidget *>(void)+0x8 [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\corelib\kernel\qmetatype.h @ 1800] 
    04 01eff8c8 0074db78 pgTunnelAppQt!qRegisterMetaType<QWidget *>(void)+0x8 [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\corelib\kernel\qmetatype.h @ 1806] 
    05 01eff8d0 0074debc pgTunnelAppQt!qRegisterWidgetsVariant(void)+0x8 [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\widgets\kernel\qwidgetsvariant.cpp @ 157] 
    06 01eff8dc 0042209d pgTunnelAppQt!`anonymous namespace'::qRegisterWidgetsVariant_ctor_class_::qRegisterWidgetsVariant_ctor_class_(void)+0xc [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\widgets\kernel\qwidgetsvariant.cpp @ 160] 
    07 01eff8e4 79ec63cf pgTunnelAppQt!`anonymous namespace'::`dynamic initializer for 'qRegisterWidgetsVariant_ctor_instance_''(void)+0xd [D:\third_party\qt\qtbase-everywhere-src-5.13.2\src\widgets\kernel\qwidgetsvariant.cpp @ 160] 
    WARNING: Stack unwind information not available. Following frames may be wrong.
    08 01eff8f4 0129600e ucrtbased!initterm+0x3f
    09 01eff958 01295f3d pgTunnelAppQt!__scrt_common_main_seh(void)+0xbe [D:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 256] 
    0a 01eff960 01296298 pgTunnelAppQt!__scrt_common_main(void)+0xd [D:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 331] 
    0b 01eff968 76106359 pgTunnelAppQt!WinMainCRTStartup(void)+0x8 [D:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_winmain.cpp @ 17] 
    0c 01eff978 776d7c24 KERNEL32!BaseThreadInitThunk+0x19
    0d 01eff9d4 776d7bf4 ntdll!RtlGetAppContainerNamedObjectPath+0xe4
    0e 01eff9e4 00000000 ntdll!RtlGetAppContainerNamedObjectPath+0xb4
    0:000> t
    

    can't run it


Log in to reply