Can't get Qt Creator debug working on Windows 10 - qt

I'm starting to work with Qt 4.8.4 on Windows 10, and I've been trying to use the debugger for two days, but I just can't get it to work.
First of all, I've downloaded MinGW 4.4, and that's the version I selected for Qt installation. I've also installed the Windows 10 debugger tools from SDK. Both x86 and x64 CDB debuggers were automatically recognized by Qt Studio, and I manually added the GDB executable that came with MinGW.
The problem is that I can't get any of those debuggers to work, even with the simplest code I can imagine, where I just increment an integer.
When using any of the CDB debuggers, I get the following message:
The selected debugger may be inappropiate for the inferior. Examining
symbols and settings breakpoints by file name and line number may
fail. The inferior is in the Portable Executable format. Selecting GDB
as debugger would improve the debugging experience for this binary
format
So I decide to select the GDB debugger I linked previously, and I get an error with message:
No symbol table is loaded. Use the "file" command.
I have looked at this, but I don't know how to set up Qt Creator to use that file command.
I have no clue on how to solve this, and neither have I find any solution on the net. Reinstalling Qt didn't work either.
Can somebody help me please? I need this for my work and I'm completely stuck.
PS: Here are my kit and debuggers configuration in case they are helpful.
Thanks a lot!

Okey, so it seems that it's not possible to use the debugger on this version of Qt with 64 bits Windows: source

Related

Qt application crash on Wayland

I've recently installed Ubuntu 22.04 LTS on my development laptop. Previously I was running 18.04 so this is my first experience of Wayland. I did a clean installation on a new disc. I had relatively few problems reinstalling gitkraken and cloning the repository of my source code from github but when I came to install the Qt libraries this is where my problems started. The on-line installer from the Qt website simply wouldn't run. It just exited silently. I eventually found an old version of the on-line installer executable in a backup of my downloads folder from Ubuntu 18.04 and was able to use this to download and install the same version of the Qt libraries that I was using previously (5.15.0). This is also the same version that I use on my other development machine which runs Windows 10. Keeping the two in step is useful and upgrading too many things at the same time seemed like asking for trouble. I installed the latest versions of Qt Creator (7.0.1) and g++ (11.2.0).
I was then able to build my application and, after a brief search of stack overflow I added "-platform wayland" to the command line arguments setting in Qt Creator but the application crashed almost immediately on start-up with the error "The Wayland connection experienced a fatal error: Protocol error".
Several things made me think this might be a bug in the Qt libraries rather than my application (none of them definitive!):
At the point of application exit, apart from main() there is none of my application code in the call-stack (see below)
My application has been stable for a long time and has survived several operating system, compiler and Qt version changes across two OS families
The fact that the latest Qt on-line installer (itself almost certainly a Qt application) wouldn't run
I downloaded Qt 5.15.12 (the latest Qt 5 version available) and rebuilt my application against that but the result was the same.
The next step is obviously to strip my application right down to something minimal that still shows the problem but before I do I was wondering whether this is something other people have come across when migrating a Qt5 application to Wayland and whether I need to take the bigger step of upgrading to Qt6? The Qt Wiki describes Qt 5.11 as being "stable" with Wayland.
The call stack at the time of the error looks like this:
qt_message_fatal
QMessageLogger::fatal
QtWaylandClient::QWaylandDisplay::checkError
QtWaylandClient::QWaylandDisplay::flushRequests
doActive
QMetaObject::activate
QSocketNotifier::activated
QSocketNotifier::event
QApplicationPrivate::notify_helper
QApplication::notify
QCoreApplication::notifyInternal2
QCoreApplication::sendEvent
socketNotifierSourceDispatch
g_main_context_dispatch
??
g_main_context_iteration
QEventDispatcherGlib::processEvents
QEventLoop::exec
QCoreApplication::exec
main
Many thanks.
It's something to do with QDialog::setMaximumSize. The call to setMaximumSize itself does not crash but if I remove all calls to it the application works fine. Some controls do subjectively seem bigger on Wayland so I wonder if Qt 5 on Wayland crashes if the size of the QDialog contents exceeds the maximum size specified. This certainly doesn't cause a crash in Qt 5 on Windows and didn't in Qt 5 on Ubuntu prior to the switch to Wayland. I think this is a Qt bug but of course it may well be fixed in a later version of Qt and there's an easy enough work-around now I know the cause.
I was using setMaximumSize to allow the dialog to expand dynamically as widgets were added but to prevent the user from making the window any bigger than it needed to be. layout()->setSizeConstraint(QLayout::SetFixedSize); achieves the same thing.

How to prevent Qt 6.0 Installer from crashing?

Here’s what happens
I open the installer, choose the packages I want(I choose to install some 1.7 GB of components), everything goes well.
But then when I click on the Install button, and Qt installer crashes! And by crashes I mean it crashes, Windows DOES NOT tell me it is not responding. The window just gets invisible from the taskbar.
There also is no possibility that it is installing in the background, as I waited for approx. 5 mins, and when I checked in the folder where I was going to install it, I didn’t find a SINGLE component installed!
How to solve that?
I asked some questions earlier because a person needs more information. It also depends on what compiler you have. There are many many known issues with Qt 6.x.
The default kit doesn't work with MSVC2019
https://forum.qt.io/topic/120357/wrong-kit-for-qt-6-0-0-msvc2019-64bit/5
Qt 6.0 has install issues with GLib 6
https://youtu.be/IZy6FMQlaNg
There also appears to be significant problems with OpenGL.
https://github.com/opencv/opencv/issues/20499
People seem to still be able to get off-line installers, and, as this French typing person found out, you have to be careful because it appears there are some 32-bit Windows kits.
https://forum.qt.io/topic/123027/installation-qt6-on-windows/7
If you try running them on a 64-bit Windows 10, they crash.
If this doesn't answer your question, you need to supply
Which Windows Version
32 or 64-bit
off-line or on-line installer?

SIGSEGV fault in qml application on app.exec()

I'm trying to set up the environment on the new machine for our application written on Qt15.2 with GCC compiler version 10.2, and because it is a windows application, I get the qt and gcc from the MSYS2.
The compiling process is going well, but when I'm trying to launch the application, it crashes with the message: "the program has unexpectedly finished. the process was ended forcefully"
The same I obtained if trying to compile a blank qml app with a single ApplicationWindow in it.
I will be very grateful for your help.
The solution was found - I used "dependencies" (https://github.com/lucasg/Dependencies) to find out, which .dll libraries are missing. The problem was in some Windows libraries because it was a fresh system downloaded from Microsoft site without any updating made yet and seems to be very old. I had updated the system and everything is working fine now.

Qt Creator crashes when attempting to open .ui forms editor

Since a week ago, everytime I try to edit a form .ui in my Qt Creator project, the program crashes and closes. This segmentation fault error details are displayed in the image below:
What I already tried
Even if I try to start over a new project, the problem remains.
I tried also to operate Qt Creator with full admin permissions, and
still it fails.
I uninstalled and reinstalled Qt. The same thing happens.
Conditions
I run Qt Creator in a Xubuntu OS (version 14.04).
The Qt version is in the image above.
Has this happened already to you? Any idea what this could be? Any troubleshooting suggestions?
Thank you!
Well, I managed to find a solution that worked.
I opened a terminal and wrote sudo apt-get purge qtcreator* (instead of remove). This way I managed to remove all dependencies.
Then I installed Qt directly from the site: http://www.qt.io/download/
This way worked fine.

gdb doesn't resume after breakpoint. MITK-Framewok Project using Qt-Creator, gdb, Linux Mint 15

I'm writing plugin for the MITK framework using Qt-Creator with gdb on Linux-Mint 15.
Resuming after halting at any breakpoint doesn't work, or seems to take upwards of 30 minutes (every time). My project is not very big however, so there's no way I've got the debugger set up correctly.
I've got the Qt 4.8 and 5.01 packages installed. MITK requires Qt4 and I believe to have it specified everywhere in the makefiles.
I do get the following output when starting to debug:
&"warning: GDB: Failed to set controlling terminal: Unpassender IOCTL (I/O-Control) f\303\274r das Ger\303\244t\n"
no loadable sections found in added symbol-file system-supplied DSO at 0x7ffff7ffa000
From other answers on this site I get that the first line can be ignored...
Can anyone say if the second line is related to my problem and possibly how?
I wonder if this could have to do with there being two versions of Qt installed on my pc - I dont know how to get Qt5 completely off the system with all its packages though...
One user mentioned this: https://stackoverflow.com/a/17256365/2561709
Its all I could really find but I dont understand it, any clues?
I'd appreciate any hint at a possible cause of the problem. Please tell me what other relevant information I could provide, thanks!

Resources