QT 5.14.1 Debugger broken after MSVC 2017 update
-
After a year of working fine, I went to debug my program today and for the first time was greeted with the following error with the program stopping in some disassembler code:
"The inferior stopped because it triggered an exception. Stopped in thread 0 by: Exception at 0x77bb1f5f, code: 0xc0000005: read access violation at: 0xffffffffbaadf00c, flags=0x0, (first chance)."
My code is simplified to the following:
class DeviceChooser : public QMainWindow { Q_OBJECT public: explicit DeviceChooser(QWidget *parent = 0); ~DeviceChooser(); } int main(int argc, char *argv[]) { QApplication a(argc, argv); a.setApplicationName(APP_NAME); a.setApplicationVersion(APP_VERSION); a.setOrganizationName(APP_ORGANISATION_NAME); a.setWindowIcon(icon); return startApplicationNormal(a); } int startApplicationNormal(QApplication &a) { DeviceChooser w; QObject::connect(&a, SIGNAL(aboutToQuit()), &w, SLOT(applicationClosing()) ); w.show(); // <-- if i step over this, the error appears return a.exec(); }
I'm not sure really why this is happening. I've reinistalled my environment and my compilers, and even uninstalled and reinstalled visual studio build tools that I was previously using with the same result. I have also tried different compiler configurations in my build settings but no luck.
What's odd is that if I press "run" after the exception is caught, the program will run as expected as if nothing happened. So I can run the program, but my debugger appears to be almost broken. Tracking variables, I am unable to see their values on breakpoints (cannot see contents of structs etc).
I am using QT 5.14.1 with qwt 6.1.3.
The stack trace through the disassembler (program stops on second line):
0x7769448b <+ 27> mov eax,dword ptr [ebp-4] 0x77bb1f5f <+ 127> cmp word ptr [eax],dx
The only difference I can see in my configuration is that the MSVC compiler updated from
15.9.28307.2094
to15.9.34601.69
.