[Qt-creator] Odd behavior where Creator fails to find executable

Murphy, Sean smurphy at walbro.com
Wed May 16 20:38:41 CEST 2018


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



More information about the Qt-creator mailing list