Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80265

unable to exec QProcess when debugging

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.12.6
    • Core: Other
    • None
    • debug target : colibri imx6, with Qt 5.12.6, with EGLFS
      debug host : ubuntu 19.04, with the correct toolchain for the target (I make both the target system and the toolchain)
    • Linux/Other display system

    Description

      So in release, I have no problem to execute this code, it return my the Ip address of the target :

          QProcess process;
          process.start("ifconfig eth0");
          process.waitForFinished(-1);
      
          QByteArray l_result = process.readAll();
      
          qDebug() << process.errorString();
      
          QRegExp ipAddr("inet addr:([0-9.]*)");
          if(ipAddr.indexIn(l_result)>=0)
          {
              return ipAddr.cap(1);
          }
          else
          {
              return "0.0.0.0";
          }
      

      but when I'm in debug on the eth0 interface, I get the following process.errorString() :

      "execvp: No such file or directory"
      

      and l_result is empty.

      I'm using remote debug, as the target is a colibri imx6.

      Edit : another example that half works :

      this code, very early in the main :

          QProcess process;
          process.start("gpg --import /usr/share/gpg_public.key");
          process.waitForFinished(-1); // will wait forever until finished
      
          qDebug() << process.errorString();
      
          process.start("fw_printenv -n restoreAppFiles");
          process.waitForFinished(-1); // will wait forever until finished
      
          qDebug() << process.errorString();
      

      give the following output :

      "Unknown error"
      "execvp: No such file or directory"
      

      so the first one is correctly executed, while the second one is not.

      Attachments

        1. trace
          5.08 MB
          aridet
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            aridet aridet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes