Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Can't run program from QT Creator says it exited or Cannot obtain a handle to the inferior

    General and Desktop
    11
    19
    19417
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pwnstar23 last edited by

      When I try to run my program it either says it exited with code 0 or it says Cannot obtain a handle to the inferior: The parameter is incorrect. I can take the built exe and run it just fine without QT Creator. I tried rebooting my pc, close/reopen QTCreator, building with different compiler, and cleaning the project.

      What's going on here?

      1 Reply Last reply Reply Quote 0
      • M
        Macro last edited by

        Once i had faced a problem like this... I just did like this.. go to Projects, and check your Qt Version and Tool Chain properties and change it to your needs... Then it worked fine for me... :)

        1 Reply Last reply Reply Quote 0
        • P
          pwnstar23 last edited by

          The tool chains and things are set up, it builds just fine. And the exe it builds when run from the folder directly runs fine. But QT doesn't run it.

          1 Reply Last reply Reply Quote 0
          • M
            Macro last edited by

            Does it says that any dll's required??

            1 Reply Last reply Reply Quote 0
            • P
              pwnstar23 last edited by

              I deleted the build folders and the .user files, still doing the same thing after restart.

              1 Reply Last reply Reply Quote 0
              • P
                pwnstar23 last edited by

                No, the .dlls are fine. Strangly I installed 2.6rc and it worked after setting up the kits, it built and run it fine a few times and now im getting the same error again.

                1 Reply Last reply Reply Quote 0
                • P
                  pwnstar23 last edited by

                  I've uninstalled and reinstalled everything QT and still getting this problem. QT is not usable like this.

                  1 Reply Last reply Reply Quote 0
                  • A
                    Amartel last edited by

                    I have the same problem. Qt 4.8.2 + Qt-Creator 2.5.2 under WinXp.
                    I ran into it in two projects: both console and finishes very quickly. One of them is a test project, the other - a console project, which does not call QCoreApplication::exec() (I checked a project, which calls it - no problem there).
                    After rebuilding - first launching finishes well. In all others qt-creator thinks that the program is still running (and writes "Cannot obtain a handle to the inferior" in debug console) though actually it does not.
                    It is annoying.

                    1 Reply Last reply Reply Quote 0
                    • 3
                      3.141592 last edited by

                      Hi there,

                      is there any solution to this problem?
                      I observed the same problem here, but the message only occurs during my QTest's.
                      I assume that the QTEST_APPLESS_MAIN sometimes runs into that error-message.
                      It seems to correlate with the presence or absence of a QCoreApplication, because if i use the same code within my Console-application the message never occurs.
                      Also Amartel mentioned, that his project using QCoreApplication runs without problems...

                      Should one file a Bug-Report here?

                      1 Reply Last reply Reply Quote 0
                      • C
                        chakie last edited by

                        I see the same on Win7 using 5.0.1. For me there has been nothing but errors with 5.0.1. For instance debug/release paths are mixed up when building, this error, uic seems to create invalid ui_foo.h files etc.

                        1 Reply Last reply Reply Quote 0
                        • M
                          monza last edited by

                          If you go to Projects -> build & Run and then check the Run settings, make sure that the Executable being called in the Run configuration is the same one for the build configuration e.g. ./debug/<your_app.exe> (use absolute path) for a debug configuration

                          1 Reply Last reply Reply Quote 0
                          • W
                            wakeuky last edited by

                            There have been a few related issues. I had the "handle" issue among others when moving to 5.0.1. I resolved using the following steps.

                            1. Clean project
                            2. Close QtCreator
                            3. Remove Release/Debug Folder from app directory
                            4. Delete xxx.pro.user file (lives in app directory)
                            5. Manually delete Makefile, Makefile.Debug, Makefile.Release (If still there)
                            6. Open Qt Creator again and open your project. It should now be asking you to reconfigure your project build settings.
                              Also, check your environment variables – ensure they are updated for 5.0.1 paths.
                              "Reference to similar problem":http://qt-project.org/forums/viewthread/25326/
                              "Reference to another similar problem":http://qt-project.org/forums/viewthread/25058/

                            Don't Panic

                            1 Reply Last reply Reply Quote 1
                            • T
                              tesmai4 last edited by

                              Thanks Wakeuky for step by step reply.

                              It is not working in my case.
                              I could debug/run my project; made some changes in the code and then this error appeared.
                              Can there any other reasons for this problem?

                              1 Reply Last reply Reply Quote 0
                              • W
                                wakeuky last edited by

                                Hi tesmal4, it has been quite a while since I have seen this issue. This issue occurred for me when I had created a project under the 4.8.4 environment and tried opening the project under 5.0.1.

                                I am no using the latest 5.1.1 release and have had no issues of the sort. What version was your project created under?
                                What version are you currently trying to use?

                                Don't Panic

                                1 Reply Last reply Reply Quote 0
                                • T
                                  tesmai4 last edited by

                                  Qt 4.7.4 for Desktop MinGW 4.4 and Qt Creator 2.4.1 . I did not change any configuration for the project. I only made changes in the cpp file.

                                  1 Reply Last reply Reply Quote 0
                                  • T
                                    tesmai4 last edited by

                                    I accidentally deleted DLL path. Now its working fine.
                                    Thanks for your help and advice.

                                    Regards

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jcga last edited by

                                      teslmai4: I have the same kind of problem with Qt 5.5.0. Can you please indicate what DLL path you delete?

                                      1 Reply Last reply Reply Quote 0
                                      • Saber Lee
                                        Saber Lee last edited by

                                        I have same issue.
                                        And I copy my own DLL file to app-out-dir.
                                        then this issue can to solute.

                                        1 Reply Last reply Reply Quote 0
                                        • jayt
                                          jayt last edited by

                                          Seems likely that it is not a real "problem" but can be due to your application exiting too quickly when being run under QtCreator, please see this link
                                          (http://stackoverflow.com/questions/21539162/qt-creator-code-is-running-but-i-get-an-error-message-from-the-ide

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post