Discussion:
[Qt-creator] Odd behavior where Creator fails to find executable
Murphy, Sean
2018-05-16 18:38:41 UTC
Permalink
I'm experiencing an intermittent issue that I'm wondering if anyone else is seeing, has an idea how to prevent, or can at least point me towards something to help me provide more information for creating a bug report?

The issue:
Periodically when I attempt to debug my program, Qt Creator throws up an error message:
Starting executable failed: C:\<big long path>\myApp.exe: No such file or directory.

The error message is technically correct, the path it is trying to execute is wrong - it's up one directory up from where the compiled debug executable is. When this error occurs, if I go to the Projects->Qt 5.9.1->Run settings I see the following for the Executable entry, which is the same wrong path that the error dialog displayed:
Executable: <path>\build-myApp-Qt_5_9_1-Debug\myApp.exe
If at this point, I close the project (leaving Qt Creator open) and relaunch the project and then look at the same setting entry I now see the correct path and I'm once again able to debug:
Executable: <path>\build-myApp-Qt_5_9_1-Debug\debug\myApp.exe // Notice the extra "debug" directory in the path
At this point pressing the Debug button (or F5) correctly launches my application in the debugger.

I have no idea what is causing this yet, other than it happens "after a while". The circumstances leading up to this is that I've had the Qt Creator and this specific project open for DAYS, writing code, compiling, debugging, etc. with no issues and then suddenly today this problem popped up on my first attempt to launch a debug session after writing some new code. Compilation was still working correctly, and in fact I had compiled the .exe, then was unable to launch it, closed the project, reopened, and immediately hit debug which worked - no compilation was necessary in the new session, so the .exe was up-to-date.

This is the second time this issue has occurred, it happened to me once last week as well. Both times just closing the project and reopening seems to restore the correct executable path, I just don't know what is causing it to break in the first place. And either no one else has reported this as a bug, or I'm not putting in the correct search terms on bugreports.qt.io, because I'm not finding anything that looks similar.

Using Qt Creator 4.6.0

Thanks in advance,
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
Henry Skoglund
2018-05-17 07:56:17 UTC
Permalink
I see, suspected it had already been reported. This is just a minor
issue, as removing the build directory and restarting Qt Creator fixes
it for me everytime.

Keep up the good work, Qt Creator is miles ahead of any other IDE!!

Rgrds Henry
You are hit by https://bugreports.qt.io/browse/QTCREATORBUG-20371 and its as related marked reports.
A late update of the qmake parser code in Qt Creator 4.6 broke reparsing in many cases, i.e. when you change .pro files or kit properties.
Parsing is successful when reopening the project to clean wrongly managed caches.
We have identified the problem, though there is no patch yet, but we plan to have that fixed in Qt Creator 4.6.2.
Br, Eike
Post by Murphy, Sean
I'm experiencing an intermittent issue that I'm wondering if anyone else is seeing, has an idea how to prevent, or can at least point me towards something to help me provide more information for creating a bug report?
Starting executable failed: C:\<big long path>\myApp.exe: No such file or directory.
...
Post by Murphy, Sean
This is the second time this issue has occurred, it happened to me once last week as well. Both times just closing the project and reopening seems to restore the correct executable path, I just don't know what is causing it to break in the first place. And either no one else has reported this as a bug, or I'm not putting in the correct search terms on bugreports.qt.io, because I'm not finding anything that looks similar.
Using Qt Creator 4.6.0
Thanks in advance,
Hi, I'm seeing this as well on Qt Creator 4.6.1, only on Windows though (i.e. not on MacOs or Linux).
In Qt Creator, switch to default session, select "Close All Projects and Editors" in the File menu. Exit Qt Creator and launch it again.
Select "New File or Project" and choose the "Qt Console Application" template. Click Next 4 times (i.e. accept the default for everything).
Run the Project (F5) one time (Debug or Release is immaterial).
Select New File or Project again. This time under "Files and Classes", add a C++ Header File. Name is irrelevant. Click Finish to add the .h file to your .pro file.
Starting C:\Projects\build-untitled-Desktop_Qt_5_10_1_MSVC2015_32bit-Debug\untitled.exe...
Executable C:\Projects\build-untitled-Desktop_Qt_5_10_1_MSVC2015_32bit-Debug\untitled.exe does not exist.
Exiting Qt Creator, erasing the build directory and relaunching Qt Creator restores functionality, i.e. Run the Project (F5) then works. But adding another dummy .h wrecks it again :-(
Rgrds Henry
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Murphy, Sean
2018-05-17 15:38:44 UTC
Permalink
You are hit by https://bugreports.qt.io/browse/QTCREATORBUG-20371 and
its as related marked reports.
Ahh ok, I did see that one yesterday, but didn't dig hard enough to see that
it's related to my issue. I won't worry about reporting it then, just living with
it until it's fixed in a future release!

Thanks,
Sean


This message has been scanned for malware by Forcepoint. www.forcepoint.com
Loading...