I'm using Qt Creator v8.0.1, Qt 6.3.2(MinGW 11.2.0 64-bit), open source version, to develop x64 Windows desktop program and I encountered an assert problem.
Usually, when debugging a program in Qt Creator, if the assert condition in the program is false, the debugger will automatically break at the assert code and we can view calling stack and variables value. If my development environment is on Intel + Windows laptops, which has always been like this.
Recently, I changed to a Mac book Pro M2, equipped Parallel Desktop 18, and installed Windows 11 (on ARM) in Parallel Desktop, and installed Qt Creator v8.0.1, Qt 6.3.2 MinGW 11.2.0 64-bit in windows 11(On ARM). Qt binary is x64 architecure. I debug a program in Qt Creator. If the assert in the program is triggered, I can't view the current function call stack and variable values like I can on Intel+windows environment. Instead, the following message will pop up:
enter image description here
After I click “Retry”, it pops up
enter image description here
It took me a long time to solve this problem,I think it may be that the Qt (x64) debugging function is not adapted well enough on the M2.
Here are some of my attempts:
I installed Visual Studio Community 2022 On ARM in Windows 11 (on ARM) in Parallel Desktop, and Debugging assert works fine in Visual Studio Community 2022.
According to the "(Press Retry to debug the application - JIT must be enabled)" on the dialog, I set Just In Time Debug in Visual Studio, but it doesn't work either.
I set up “GDB Extended” in Qt Creator but it doesn’t work. And it has a great negatively impact on the debugging speed.
I tried to install the Qt for Windows on ARM, bug MinGW 11.2.0 64-bit kit was not supported. (https://doc.qt.io/qt-6/windows.html)
Does anyone know the reason for this problem? Or give some ideas. Thank you.
Related
I installed Qt 5.10 Development Environment on my computer, where I had already installed Visual Studio 2017 with v141_xp toolset.
When I installed Qt 5.10, I selected the Mingw32 Tool Kit option.
Now, I have a QML application built using the Mingw32 build kit; this application uses some 3D feature (e.g. Bars3D, but it does not use angle).
I use the windeployqt.exe found in \mingw53_32\bin dictionary to deploy my application. That's works ok and can work in Windows 7.
However, when I copy the deployed files onto Windows SP with SP3, it cannot run;
I get an error like
"cannot find the entry point xx in kernal32.dll..."
How can I deploy Qt 5.10 QML application for Windows XP using the VC compiler or using the Mingw or Alor? Or is there something else I need to know?
https://wiki.qt.io/PlatformSupport
5.6 is last official release that supports XP, but Im using
Qt 5.7 VS2015 in Xp (but without webengine)
I am working on a Gui Qt application. When deployed with the right dependencies it can be run independently as mingw-release, mingw-debug, msvc-release, and msvc-debug. When debugging under Qt Creator the mingw-debug can be debugged. However debugging the msvc-debug gives a crash. The disassembler shows:
ntdll!RtlUserThreadStart:
0x7ff901ae0d30 sub rsp,48h
This happens with even the most trivial GUI application. I have tried several Qt versions. At present I am using VC 2015 and Qt 5.10. The debugger is part of the Windows SDK kit. I am running Windows 10.
Added on Dec 28:
I can step into the debugger. The crash occurs as soon as the GUI thread is invoked, like window.show();
I installed Qt Creator on a Windows XP VM, but it gives me this error message several times:
I get this message box several times, then Qt Creator starts, but it behaves weird - some widgets don't repaint, and become black boxes:
Also Qt Creator crashes after I closing, and the crash happens in opengl32sw.dll.
Does this mean that Qt Creator no longer supports Windows XP? I assume they no longer test it against Windows XP or they wouldn't have shipped a version with such an obvious error.
Turns out Qt Creator really has dropped support for XP, because of ANGLE OpenGL:
As Kenneth reminds us1, Microsoft is ending the security updates for
Windows XP in April 2014. That's about when we plan to release Qt 5.3.
Actually ANGLE (one of the OpenGL backends we have for Windows) doesn't support Windows XP already now, which is why e.g. Qt Creator 3.0 will not support it either in 5.2.
I ended up downloading an older version of Qt SDK from here - https://download.qt.io/archive/qt/4.8/4.8.6/, since I don't mind using Qt4. But if the quoted text above is correct, Qt 5.1, should come with Qt Creator that still supports XP as well.
I'm still using the QtCreator-3.5.1 based on Qt-5.5.1 in Windows XP. Just removing the opengl32sw.dll works for me.
I want to have the same developing environment either in Linux and in Windows so I decided to use Qt Creator. But for some unknown reason I cannot trace my project in Qt Creator under Windows 7. I compile my program as DEBUG target, the resulting executable contains all debug info. After that I press F10 key to step over main function but instead of stepping it just brings program to run. Stepping into via F11 does the same thing.
Firstly I tried gdb shipped with MinGW but Qt Creator refused even to run it complaining that it should be Python capable. After that I have downloaded and installed gdb with Python support from
http://download.qt-project.org/development_releases/prebuilt/gdb/windows-7/qtcreator-gdb-7.4-MINGW32_NT-6.1-i686.tar.gz
as Qt Creator manual recommends but it just made that Qt Creator is able to start the debugger and nothing more, I could not do source level debugging anyway.
Qt Creator under Linux works fine with the same project, it traces, steps and shows the sources Ok. I run MinGW 4.8.1 and Qt Creator 3.1.1 under Windows 7 64bit and the same Qt Creator 3.1.1 version under Fedora Linux 64bit. How can I achieve source level debugging under Windows like under Linux I do?
The best thing is to use Visual studio express compiler and then install the windows debugging tools like specified here and configure qt-creator
Recent GDB builds shipped with MinGW are Python-enabled, and work out-of-the-box in Qt Creator. The link you found seems outdated.
Is it any way in QtCreator for windows to build a 64-bit executable? (I need to use a COM object as INPROC and this object is only available for 64 bit architecture)
I do not see any reason why not. You would need:
To be working on a 64-bit processor,
Ensure you have the Visual Studio 64 bit edition
Compile Qt on that 64 Bit setup
Compile QtCreator on that setup
The email says that debugging tools would also need to be compiled. I am not sure which debugger QtCreator uses but I would image it would be open source and you could compile it on that setup anyway.
Qt probably do not do it by default because they already produce loads of different builds for all the platforms they support and there has not yet been a large demand for 64bit windows desktop applications.
Pekka Gaiser correctly pointed to an email from Trolltech. Basically, that's it :)
Specifically: Seemingly there is no 64 bit cross-compiler for Windows (due to that, there is no 64bit VLC for Windows). Therefore, the Microsoft compiler must be used. Unfortunately, Creator's support for Microsoft's toolchain is limited (although they make big steps towards supporting it fully).
Again: The email pointed to by Pekka Gaiser contains the information and links for using Qt Creator with Microsoft's 64bit toolchain.