Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QProcess : Failed to start after after several successful launch
Forum Updated to NodeBB v4.3 + New Features

QProcess : Failed to start after after several successful launch

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
12 Posts 3 Posters 1.8k Views 1 Watching
  • 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.
  • A Arthux

    Hello
    I develop an application for an embedded system. This application should run other applications such as ps or ifconfig with a QProcess at regular intervals.
    But after one or two days of normal operation, applications do not want to be launched. The QProcess class issues the FailedToStart signal.
    Do you have an idea ?
    Thank you very much.
    Arthux

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #2

    @Arthux said in QProcess : Failed to start after after several successful launch:

    QProcess

    Do you terminate old processes? Did you check your OS logs?

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    2
    • A Offline
      A Offline
      Arthux
      wrote on last edited by Arthux
      #3

      @jsulm said in QProcess : Failed to start after after several successful launch:

      Do you terminate old processes? Did you check your OS logs?

      For the old process, when it is not finidhed, i have this log : QProcess::start: Process is already running but I don't have that, I have failed to start.
      For OS logs, I will watch when it happens again. I don't have this for the moment.

      Thank a lot for your answer.

      jsulmJ JonBJ 2 Replies Last reply
      0
      • A Arthux

        @jsulm said in QProcess : Failed to start after after several successful launch:

        Do you terminate old processes? Did you check your OS logs?

        For the old process, when it is not finidhed, i have this log : QProcess::start: Process is already running but I don't have that, I have failed to start.
        For OS logs, I will watch when it happens again. I don't have this for the moment.

        Thank a lot for your answer.

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #4

        @Arthux said in QProcess : Failed to start after after several successful launch:

        QProcess::start: Process is already running

        Sounds like you're reusing QProcess instance and the previously started process is still running.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • A Arthux

          @jsulm said in QProcess : Failed to start after after several successful launch:

          Do you terminate old processes? Did you check your OS logs?

          For the old process, when it is not finidhed, i have this log : QProcess::start: Process is already running but I don't have that, I have failed to start.
          For OS logs, I will watch when it happens again. I don't have this for the moment.

          Thank a lot for your answer.

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #5

          @Arthux said in QProcess : Failed to start after after several successful launch:

          QProcess::start: Process is already running.

          I think this indicates that you are trying to re-use the same QProcess instance to run a new process when the previous one has not finished. Find out why the old invocation did not finish, and QProcess::terminate() or even kill() if you have no alternative.

          1 Reply Last reply
          1
          • A Offline
            A Offline
            Arthux
            wrote on last edited by Arthux
            #6

            Thank for your answer, but I don't have QProcess::start: Process is already running, i have FailedToStart signal after several successful lanch of the same instance

            jsulmJ 1 Reply Last reply
            0
            • A Arthux

              Thank for your answer, but I don't have QProcess::start: Process is already running, i have FailedToStart signal after several successful lanch of the same instance

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #7

              @Arthux But when do you get "QProcess::start: Process is already running"?
              It should be when you call start()...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Arthux
                wrote on last edited by
                #8

                yes, but this problem is logged and solved. Now, i have FailedToStart signal after several successful lanch of the same instance.

                JonBJ 1 Reply Last reply
                0
                • A Arthux

                  yes, but this problem is logged and solved. Now, i have FailedToStart signal after several successful lanch of the same instance.

                  JonBJ Online
                  JonBJ Online
                  JonB
                  wrote on last edited by
                  #9

                  @Arthux
                  But we are asking you whether you are re-using the same QProcess instance the second time you start(), when you have previously done a start() on that same instance and the process has not yet stopped? that should be the cause of the error message you report?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Arthux
                    wrote on last edited by
                    #10

                    I think no, because the program is PS and run 1s max and I start the instance all minutes. I think the PS program is already stopped, no ?
                    When the program run again and you call start() function, you have QProcess::start: Process is already running. But I don't have this, I have "QProcess::FailedToStart".

                    In documentation , Failed To Start error means "The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program." But it the same instance, same program, same arguments, so the program is not missing, I have sufficient permissions to invoke the program and I started it a lot of times before.

                    I do not know why at one point he stops throwing himself.

                    JonBJ 1 Reply Last reply
                    0
                    • A Arthux

                      I think no, because the program is PS and run 1s max and I start the instance all minutes. I think the PS program is already stopped, no ?
                      When the program run again and you call start() function, you have QProcess::start: Process is already running. But I don't have this, I have "QProcess::FailedToStart".

                      In documentation , Failed To Start error means "The process failed to start. Either the invoked program is missing, or you may have insufficient permissions to invoke the program." But it the same instance, same program, same arguments, so the program is not missing, I have sufficient permissions to invoke the program and I started it a lot of times before.

                      I do not know why at one point he stops throwing himself.

                      JonBJ Online
                      JonBJ Online
                      JonB
                      wrote on last edited by JonB
                      #11

                      @Arthux
                      OK, understood. I don't know either, and I doubt it has anything to do with Qt or that you can find out more from Qt (you have put slot onto errorOccurred, haven't you)? Maybe the board has run out of memory/processes?? Maybe the board does not allow you to run the same process if it has not already finished (doubtful, but maybe)?? You really need some OS/board logs....

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Arthux
                        wrote on last edited by
                        #12

                        Yes, I am ok with you, I'll watch the next time that happens

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved