我用Qt Creator 4.0.3开发了一个小的Qt应用程序,基于Qt 5.7.0 (MSVC 2013, 32位)。它有一些GUI特性,2个UI表单,并执行一些计算。我在Windows 7 SP1(64位)上工作。
无论如何,它在调试模式下工作良好(从Qt Creator编译和执行)。在发布模式下编译也是可以的,但是当我在发布模式下启动它时,应用程序从一开始就崩溃了,我得到以下错误信息:
Nom d ' samvacimement de problem: APPCRASH
Qt5Widgets.dll
异常代码:c0000005
daccage de l 'exception: 00000000000443f6
版本du system system: 6.1.7601.2.1.0.768.3
参数标识符:1036
信息补充器n°1:8ea0
信息补充器n°2:8ea0c4174e0822e8b28dbc57f24bae2b
信息补充通讯n°3:3b5a
信息补充器n°4:3b5adda433ec4f225b96ef9c334a03
我真的猜不出这个问题是如何解决的,它阻止我跳到部署过程的下一步(顺便说一句,我在双击它时直接执行应用程序时得到同样的错误,即使在使用windeployqt并添加所需的dll…)。
这是我的。pro文件:
QT += xml widgets network
greaterThan(QT_MAJOR_VERSION, 4): QT += printsupport
HEADERS +=
fenprincipale.h
quandldatadomdoc.h
historique.h
portfoliohistorique.h
portfolio.h
security.h
portfoliomodel.h
portfolioitem.h
portfoliodelegate.h
historicmanager.h
dialogvarhisto.h
qcustomplot.h
fengraphvar.h
SOURCES +=
fenprincipale.cpp
main.cpp
quandldatadomdoc.cpp
historique.cpp
portfoliohistorique.cpp
portfolio.cpp
security.cpp
portfoliomodel.cpp
portfolioitem.cpp
portfoliodelegate.cpp
historicmanager.cpp
dialogvarhisto.cpp
qcustomplot.cpp
fengraphvar.cpp
RESOURCES +=
resourcesro.qrc
FORMS +=
dialogvarhisto.ui
fengraphvar.ui
编辑:查看JIT Visual Studio调试器窗口,我得到以下输出:
Callstack:
Qt5Widgets.dll!00000000506843f6() Unknown
RiskOffice.exe!000000013f9f3c60() Unknown
RiskOffice.exe!000000013f9f16d1() Unknown
RiskOffice.exe!000000013f9f7795() Unknown
RiskOffice.exe!000000013fa34465() Unknown
RiskOffice.exe!000000013fa33dfd() Unknown
[External Code]
--------------------------------------------OUTPUT----------------------
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Widgets.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32gdi32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32user32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32lpk.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32usp10.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32msvcrt.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Gui.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32ole32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32rpcrt4.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Core.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32shell32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32shlwapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32advapi32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32sechost.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32ws2_32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32nsi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32mpr.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32msvcp120.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32msvcr120.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Xml.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Network.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32dnsapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32IPHLPAPI.DLL'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32winnsi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32crypt32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32msasn1.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32imm32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32msctf.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32nvinitx.dll'. Cannot find or open the PDB file.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32cryptbase.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32profapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsplatformsqwindows.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32winmm.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32oleaut32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32uxtheme.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32dwmapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsbearerqgenericbearer.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32dhcpcsvc.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32dhcpcsvc6.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsbearerqnativewifibearer.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32wlanapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:WindowsSystem32wlanutil.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqdds.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqgif.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqicns.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqico.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqjpeg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqsvg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64binQt5Svg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqtga.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqtiff.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqwbmp.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:Qt5.7msvc2013_64pluginsimageformatsqwebp.dll'. Module was built without symbols.
The thread 0x1edc has exited with code 0 (0x0).
Unhandled exception at 0x00000000506843F6 (Qt5Widgets.dll) in RiskOffice.exe: 0xC0000005: Access violation reading location 0xFFFFFFFFFFFFFFFF.
…这基本上说一些模块(包括Qt5Widgets.dll)是"没有符号构建的",但我不知道如何解释这个…
好,我刚刚忘记在实例化主窗口时删除未初始化的QAction对象。将它添加到QMenuBar中不会使应用程序在调试模式下崩溃,但确实会使其在发布模式下崩溃!不可思议!