Unable to create a debugging engine in QT editor - c++

I have recently installed Qt Creator 4.8.0 based on Qt 5.12.0 and I have it configured like in the image below. However, I haven't managed to start the debugger. As it can be seen, the debugger is correctly set for this kit, the one I'm using right now.
Any solution?
Thanks!

Wow! I found it!!! Here in the tab "projects", there are several build and run configurations. Despite you select a default kit, the final one being executed is the one in black under this tab.
Finally I disabled all of them except the one that was properly configured in the Kits window and it worked. I hope this information is helpful for someone. I don't think that part of the configuration is clear.

I got the same error, but in my case I was using the MSVC compiler and the kit didn't manage to find the CDB debugger. I was able to fix it by going to "Add or remove programs" -> "Windows Software Development Kit" -> Modify -> Change -> Debugging Tools for Windows.

In my case it was needed to select "Enable C++" under Debugger settings
screenshot

The same dumm error QT creator shows when you simply don't have gdb installed.
Worked in my case ;)

I had the same error in MacOS, debugger suddenly stopped working (LLDB debugger worked in XCode but not Qt Creator).
In this case, I reinstalled Qt Creator and reinitialized the config by removing the .config/QtProject directory located in homedir. This solved the problem.

I had the same issue when Qt Creator didn't recognized the path to the Debugger. Due to some reason it showed multiple Auto-detected Debuggers at the same location. And on the top one of the list with the red error indicator.
see
Projects->Manage Kits...->Debuggers
I removed the erroneous Debugger and restart the Qt Creator.

Related

Qt crashes when I try to execute any program

I've looked for an answer during a few days and I haven't found anything similar anywhere;
I downloaded Qt from the official website, installed it and apparently compiling is fine. But whenever I try to execute (Ctrl+R) any app, even the basic one which only displays a window or widget, QtCreator itself crashes. No error message, nothing, just crashing.
I've tried to redownload and reinstall it a few times with different settings, but nothing will do.
I'm running QtCreator on Windows 7 64 bits. I'll try on my laptop which is also running windows and will update if I find anything.
Any help would be appreciated, I need to start a project as soon as possible. I'm relatively new to QT and if you need info on anything just ask me. Thanks :)
Use dependency walker, http://www.dependencywalker.com/
and post any missing dependencies. It is possible some install targets or options are missing from when you installed QtCreator, which can be resolved with the maintenance tool in the same directory you installed Qt.
Also, are you using the Visual Studio compiler(must have Visual Studio installed separately, and mark the option during install), or the Ming compiler(2 options checked during install or maintenance)?
Check if your antivirus is locking it, I had a similar issue time ago and it was due to antivirus (Avast specifically). Disable antivirus' realtime shields and try to execute a basic app.
It is necessary to use QtCreator? I use QtDesigner snd VS2013 and things go very well. :)
check this thread Qt Creator Plain C++ Project won't run/debug... and this C++ - QtCreator doesn't show any output

Cannot Connect to QML Emluation Layer (QML Puppet)

I just made the fresh QT installation and when I create empty QT Quick project or open any of existing QT Quick examples, my QML designer doesn't work. It shows "Cannot Connect to QML Emluation Layer (QML Puppet)" error.
I tried to reinstall QT, reboot, installed additional QT kit versions and tried to switch between 32bit/64bit default/opengl versions of the kit and nothing seems to work for me. I was able to successfully run the designer ONCE, and after I closed it and tried to re-open the file it stopped working again. I also tried to search, but didn't find any solution. I also tried to ask on QT forums, but didn't receive any answer.
My system is Windows 7, with Visual Studio 2013 installed. Thanks for your help!
Do this:
Go to QT Creator Preferences (Menu Bar | Tools > Options)
Select QT Quick Option (Options headings - left side).
Click the QT Quick Designer tab.
Under QML Emulation Layer grouping, select "Use QML Emulation Layer that is built with selected QT".
No need to choose a path,
And click OK.
It will rebuild your designer view.
Worked for me.
Possibly related to this bug. Just try this workaround: in the Options
dialog go to “Qt Quick / Qt Quick Designer / QML Emulation Layer” and
disable the checkbox “Always use the QML emulation layer prived by Qt
Creator”. That will cause a rebuild of the emulation layer with the
used Qt version in the current project. That layer does not crash.
This workaround only works with Desktop Kits. – BaCaRoZzo Mar 30
This worked for me on Ubuntu 14.04.
Go to Tools->Options->Qt Quick.
In QML Emulation Layer, make sure
the path is correct for "Use fallback QML emulation layer".
Since I was reinstalling Qt, the new installation had the old path of Qt which gave rise to this issue.
If failed anyway, use "Qt Design studio" instead and build it again, it worked for me.
I recommend to uninstall Qt first and then reinstall it with "Qt Design Studio" box checked.
On Ubuntu 20 LTS, you can run it on: /home/Qt/Tools/QtDesignStudio/bin/qtdesignstudio
Good luck.

QT Creator - breakpoint not persistent for every build

I'm trying to use QT Creator for an open-source project I downloaded from github.
After some fuddling around I managed to get the project to compile in QT Creator and run in debug mode.
However, I have an issue : strangely the breakpoints that I set are only available for that instance for the debug run for QT Creator. When I stop the debugging, and relaunch the debugging, the previously stated breakpoints are still there, but they are no longer valid. (meaning Qt Creator skips over them). I've verified that new breakpoints are still valid - it's the old ones that become invalid even though they are still listed.
I did not even update any code, just added breakpoints, hit debug and the old breakpoints became invalid even though they are still showing.
No sacarsm intended, but is this a "feature"? If so, how do I turn it off?
If not a feature, what can I try?
It's very painful to re-add breakpoints every time I run a debug.
Using Mac OSX 10.9 here, Qt 5.2, with Qt Creator 3.0 for Mac.
Thanks.
EDIT : Some more info. I realised that whenever the breakpoint works, it has a tiny hour glass next to it, like in the picture. What does the hour glass mean? It could just be something dumb that I'm not doing....
in the end I filed a bug with Qt Creator. For those interested pls check here.
https://bugreports.qt-project.org/browse/QTCREATORBUG-11184

Juno CDT plugin failing to run a C++ application

I have a simple mixed C/C++ application (OpenGL example) which I have successfully built using Eclipse CDT in Juno (MinGW toolchain).
I can run this application fine by hand from a Win7 command console, but it seems to rarely work when running from Eclipse's "Run as" menu. Whether it works or not seems down to seemingly unrelated changes in the code, and I get nothing of interest on the Eclipse run console (just a <terminated> status) even when no code near the start of the application has changed.
I'd like to and it sometimes I can work around this for now, but would be good to get this working if anyone has any ideas - it seems an essential stepping stone to get the debug environment working in Eclipse.
EDIT Side thought - eclipse seems awfully thin on debug diagnostics when something like this fails. If there is any way to turn on more debug I'd welcome the knowledge =)
Resolved - the issue is down to the path being given to the application, or more specifically the OS launcher (so it can find the DLLs it needs).
Even through the default "run" config claims to inherit the parent environment, it doesn't seem to get the same environment as the Win7 command console. I had to manually edit the "Run as" config in Eclipse to have a custom PATH environment variable containing the directories I needed (MinGW/bin, and a directory containing some custom DLLs).
Cheers, Iso

C++ application fails to start correctly (0xc000000d)

I'm writing a C++ application using VS2010 on two dev computers - both are Win7 64bit SP1. I use git to sync the repositories.
On one of the machines the compiled executable (and also the test exec) stopped working with the following error, while on the other machine it works fine and I'm able to continue development.
The application was unable to start correctly (0xc000000d). Click OK to close the application.
I tried deleting the repository and cloning it again. I also made sure I have the same versions of Boost, git, Visual Studio. Also, I tried debugging (stepping in) but the error occurs before any line of code is reached.
Notice as far as I understand I'm tracking Visual Studio's solution\project configuration files as detailed here.
I'm at a loss, how would you debug this?
UPDATE 1:
Only the Debug version fails to run. The Release version runs fine
UPDATE 2: The executable that doesn't work does work on the other computer!
UPDATE 3: I've reinstalled VS2010 (exactly the same version) - didn't help. Surprisingly the compiled files are not the same size between the two machines.
I got the same problem as you mentioned.
My solution:
Clean the manifest file and rebuild
In the property page-> Manifest tool -> make sure "Additional Options" is set to nothing.
(I set it as "/validate_manifest" before).
Or you can try "Embed Manifest -> NO", rebuild and then set back to Yes. It sounds to be ridiculous, but it really works sometimes. I don't know why.
I got the same phenomenon suddenly without a warning on Win7 / VS2010 / C++. Debug App couldn't be launched, got 0xC000000D at initializing and loading multiple dlls. Found one base dll of my own responsible, played around with linker settings. Modifying settings, incremential rebuild -> app starts, rebuild all -> app crashes again. After setting "generate manifest" to "no" in the linker settings the sample app works, but the main app still crashes. After setting "generate manifest" to "no" for the most of my dlls -> the app starts in debug mode again. The stuff is very spurious, because some dlls need the modified settings others do not.
Have a look at the top two answers to this question
Program crashes with 0xC000000D and no exceptions - how do I debug it?
On the machine where it fails, try running the debug executable NOT under the debugger, and update your question to say what happens. If it crashes, are you able to then attach the debugger whilst the message box is still there and get a stack trace that tells you what function it is crashing in?
This is the weirdest thing....
Try deleting the "ipch" directory and then rebuilding.
Hope it works for you, I have wasted hours on this.
disabling/enabling precompiled headers fixed the issue for me.
I was facing crash on Debug x64 only - I guess it was related to an upgrade from boost 1.50 to 1.52, while keeping pch files.
in my case i got it working again by setting generate manifest to NO on all projects
I have changed "Embed manifest" setting to NO and then back to YES but it didn't help.
For me setting General->Platform Toolset to Windows SDK 7.1 for my program and all dependent libraries compiled with it helped.
It's the ipch just delete the entire folder and it will clear it up. I was confused for a while too.
I saw the error while using OpenCV library compiled with MSVC2010 in a project running on MSVC2015. Changing project configuration properties->General->Platform toolset from Visual Studio 2015(v140) to Visual studio 2010(v100) resolved the error.