我使用Qt Creator 4.0.3开发了一个小型Qt应用程序,基于Qt 5.7.0(MSVC 2013,32位)。它有一些GUI功能,2个UI表单,并执行一些计算。我在Windows 7 SP1(64位)上工作。
无论如何,它在调试模式下工作正常(从Qt Creator编译和执行)。在发布模式下编译也没问题,但是当我在发布模式下启动它时,应用程序从一开始就崩溃了,我收到以下错误消息:
Nom d'événementdeproblème:APPCRASH
Nom du modulepardéfaut: Qt5Widgets.dll
Code de l'exception: c0000005
Décalagedel'exception:00000000000443f6
版本:syststème:6.1.7601.2.1.0.768.3
Identificateurdeparamètresrégionaux:1036
信息提供者n°1:8ea0
信息提供者n°2:8ea0c4174e0822e8b28dbc57f24bae2b
信息提供者n°3:3b5a
信息提供者n°4:3b5acddea433ec4f225b96ef9c334a03
我真的无法猜测问题是如何解决的,它阻止我跳到部署过程的下一步(顺便说一句,当双击时尝试直接执行应用程序时出现同样的错误它,甚至在使用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:\Qt\5.7\msvc2013_64\bin\Qt5Widgets.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\lpk.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\usp10.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\bin\Qt5Gui.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\bin\Qt5Core.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\nsi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\mpr.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\msvcp120.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\msvcr120.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\bin\Qt5Xml.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\bin\Qt5Network.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\dnsapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\winnsi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\msctf.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\nvinitx.dll'. Cannot find or open the PDB file.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\cryptbase.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\platforms\qwindows.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\winmm.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\bearer\qgenericbearer.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\dhcpcsvc.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\dhcpcsvc6.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\bearer\qnativewifibearer.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\wlanapi.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Windows\System32\wlanutil.dll'. Symbols loaded.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qdds.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qgif.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qicns.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qico.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qjpeg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qsvg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\bin\Qt5Svg.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qtga.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qtiff.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qwbmp.dll'. Module was built without symbols.
'RiskOffice.exe' (Win32): Loaded 'C:\Qt\5.7\msvc2013_64\plugins\imageformats\qwebp.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)是“没有符号构建的”,但我不知道如何解释这个......
答案 0 :(得分:0)
好的,我刚刚忘记在MainWindow的实例化中删除未初始化的QAction对象。将它添加到QMenuBar没有让应用程序在调试模式下崩溃,但是DID让它在发布模式下崩溃了!太棒了!