Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. qt cmdline app does not launch on mac OS X 10.14.6
Forum Updated to NodeBB v4.3 + New Features

qt cmdline app does not launch on mac OS X 10.14.6

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 3 Posters 923 Views 2 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.
  • ademmlerA Offline
    ademmlerA Offline
    ademmler
    wrote on last edited by
    #1

    Hi there,

    1. A simple qt cmdline app does not launch on mac OS X 10.14.6.
    2. Launch process is slow.
    3. When I go to finder and launch the executable form there all is fine.

    Terminal says:
    Last login: Wed Aug 19 12:22:34 on ttys000
    /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpmh8lOZ ; exit;
    rocket:~ ademmler$ /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpmh8lOZ ;
    exit;
    Cannot connect creator comm socket /private/var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/QtCreator.gfveRr/stub-socket: No such file or directory
    Press <RETURN> to close this window...

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you have any custom stuff done when starting a command line session ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      ademmlerA 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Do you have any custom stuff done when starting a command line session ?

        ademmlerA Offline
        ademmlerA Offline
        ademmler
        wrote on last edited by
        #3

        @SGaist No - I think not.

        I made a minimal app - for another thread here. Thats how I noticed this.
        you may remember I was reporting this earlier this year in another thread.

        How can i measure the time needed from "launch in qt" until the console window pops up?
        Why does is lose its socket?

        Regards Alexander

        Here is the code

        #include <QCoreApplication>
        #include <QStandardPaths>
        #include <QDir>
        #include <QDebug>
        #include <QElapsedTimer>
        
        void exitApp(int r){
            QCoreApplication::exit(r);
        }
        
        int main(int argc, char *argv[])
        {
            QCoreApplication a(argc, argv);
        
        
            QElapsedTimer timer;
            timer.start();
        
            qDebug() << "QDir::separator = " << QString(QDir::separator()) << Qt::endl;
            qDebug() << "QStandardPaths::DesktopLocation = " << QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) << Qt::endl;
        
        //    QDir resourcesPath(QCoreApplication::applicationDirPath());
        //    resourcesPath.cd("../Resources/test");
        
        //    qDebug() << "QCoreApplication::applicationDirPath() = " << resourcesPath << Qt::endl;
        
            QDir mydir = QDir(QCoreApplication::applicationDirPath());
        
            qDebug() << "That is mydir: " << mydir;
            qDebug() << "Change dir: " << mydir.cd("Resources/test me");
            qDebug() << "Path: " << mydir.currentPath();    
            qDebug() << "Content: " << mydir.entryList();
        
            qDebug() << "Timer: " << timer.elapsed();
        
            return a.exec();
        }
        
        JonBJ 1 Reply Last reply
        0
        • ademmlerA ademmler

          @SGaist No - I think not.

          I made a minimal app - for another thread here. Thats how I noticed this.
          you may remember I was reporting this earlier this year in another thread.

          How can i measure the time needed from "launch in qt" until the console window pops up?
          Why does is lose its socket?

          Regards Alexander

          Here is the code

          #include <QCoreApplication>
          #include <QStandardPaths>
          #include <QDir>
          #include <QDebug>
          #include <QElapsedTimer>
          
          void exitApp(int r){
              QCoreApplication::exit(r);
          }
          
          int main(int argc, char *argv[])
          {
              QCoreApplication a(argc, argv);
          
          
              QElapsedTimer timer;
              timer.start();
          
              qDebug() << "QDir::separator = " << QString(QDir::separator()) << Qt::endl;
              qDebug() << "QStandardPaths::DesktopLocation = " << QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) << Qt::endl;
          
          //    QDir resourcesPath(QCoreApplication::applicationDirPath());
          //    resourcesPath.cd("../Resources/test");
          
          //    qDebug() << "QCoreApplication::applicationDirPath() = " << resourcesPath << Qt::endl;
          
              QDir mydir = QDir(QCoreApplication::applicationDirPath());
          
              qDebug() << "That is mydir: " << mydir;
              qDebug() << "Change dir: " << mydir.cd("Resources/test me");
              qDebug() << "Path: " << mydir.currentPath();    
              qDebug() << "Content: " << mydir.entryList();
          
              qDebug() << "Timer: " << timer.elapsed();
          
              return a.exec();
          }
          
          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @ademmler
          The only thing here which should/might "take some time" is the mydir.entryList(). And I wouldn't expect it to be much. How much elapsed time does your code above show?

          ademmlerA 1 Reply Last reply
          0
          • JonBJ JonB

            @ademmler
            The only thing here which should/might "take some time" is the mydir.entryList(). And I wouldn't expect it to be much. How much elapsed time does your code above show?

            ademmlerA Offline
            ademmlerA Offline
            ademmler
            wrote on last edited by
            #5

            @JonB in the directory - I use for testing - is only one file ;-)

            JonBJ 1 Reply Last reply
            0
            • ademmlerA ademmler

              @JonB in the directory - I use for testing - is only one file ;-)

              JonBJ Offline
              JonBJ Offline
              JonB
              wrote on last edited by
              #6

              @ademmler
              Try this for your program!

              int main(int argc, char *argv[])
              {
                  Q_UNUSED(argc);
                  Q_UNSED(argv);
                  return 0;
              }
              

              How long does this take?

              ademmlerA 1 Reply Last reply
              0
              • JonBJ JonB

                @ademmler
                Try this for your program!

                int main(int argc, char *argv[])
                {
                    Q_UNUSED(argc);
                    Q_UNSED(argv);
                    return 0;
                }
                

                How long does this take?

                ademmlerA Offline
                ademmlerA Offline
                ademmler
                wrote on last edited by ademmler
                #7

                @JonB

                It takes 10 seconds until the console appears ... which is way to long ...

                If I launch the same executable direct in the console it takes:
                real 0m0.034s
                user 0m0.010s
                sys 0m0.008s

                Last login: Thu Aug 20 10:35:12 on ttys000
                /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpEIFMX5 ; exit;
                rocket:~ ademmler$ /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpEIFMX5 ;
                exit;
                Cannot connect creator comm socket /private/var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/QtCreator.tneJjR/stub-socket: No such file or directory
                Press <RETURN> to close this window...

                JonBJ 1 Reply Last reply
                0
                • ademmlerA ademmler

                  @JonB

                  It takes 10 seconds until the console appears ... which is way to long ...

                  If I launch the same executable direct in the console it takes:
                  real 0m0.034s
                  user 0m0.010s
                  sys 0m0.008s

                  Last login: Thu Aug 20 10:35:12 on ttys000
                  /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpEIFMX5 ; exit;
                  rocket:~ ademmler$ /var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/tmpEIFMX5 ;
                  exit;
                  Cannot connect creator comm socket /private/var/folders/8t/qzzv_8h50y70jlpgyl14v28c0000gn/T/QtCreator.tneJjR/stub-socket: No such file or directory
                  Press <RETURN> to close this window...

                  JonBJ Offline
                  JonBJ Offline
                  JonB
                  wrote on last edited by
                  #8

                  @ademmler
                  Yes, and so there is the problem, nothing to do with your actual code. I know nothing about what's going on on Mac I'm afraid. Out of interest, does this only happen when you run for debug from Creator, how is it if you select non-debug run only?

                  ademmlerA 1 Reply Last reply
                  0
                  • JonBJ JonB

                    @ademmler
                    Yes, and so there is the problem, nothing to do with your actual code. I know nothing about what's going on on Mac I'm afraid. Out of interest, does this only happen when you run for debug from Creator, how is it if you select non-debug run only?

                    ademmlerA Offline
                    ademmlerA Offline
                    ademmler
                    wrote on last edited by ademmler
                    #9

                    @JonB said in qt cmdline app does not launch on mac OS X 10.14.6:

                    I know nothing about what's going on on Mac I'm afraid
                    You may better first investigate macs, before you answer mac related questions ...

                    This is why I asked @SGaist to help me:
                    From my point of view it is a problem of QtCreator ...
                    After pressing "run" it takes simply to long (10-40 seconds) until the code is executed.
                    And I am not talking about running "debugger"!
                    For development in QtCreator it is mandatory to use build/run/debug in a fast manner ...

                    JonBJ 1 Reply Last reply
                    0
                    • ademmlerA ademmler

                      @JonB said in qt cmdline app does not launch on mac OS X 10.14.6:

                      I know nothing about what's going on on Mac I'm afraid
                      You may better first investigate macs, before you answer mac related questions ...

                      This is why I asked @SGaist to help me:
                      From my point of view it is a problem of QtCreator ...
                      After pressing "run" it takes simply to long (10-40 seconds) until the code is executed.
                      And I am not talking about running "debugger"!
                      For development in QtCreator it is mandatory to use build/run/debug in a fast manner ...

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #10

                      @ademmler said in qt cmdline app does not launch on mac OS X 10.14.6:

                      You may better first investigate macs, before you answer mac related questions ...

                      That appears to be your comment. I have tried to help you all over the place with your various questions. In view of your reaction, I will cease to do so from now on for any of your questions.

                      So far as I am concerned, this is very rude to someone who chooses to spend time looking at others' questions. I was going to investigate this further for you, but certainly will not do so now. Good luck in choosing who you want to answer what. Bye.

                      ademmlerA 1 Reply Last reply
                      1
                      • JonBJ JonB

                        @ademmler said in qt cmdline app does not launch on mac OS X 10.14.6:

                        You may better first investigate macs, before you answer mac related questions ...

                        That appears to be your comment. I have tried to help you all over the place with your various questions. In view of your reaction, I will cease to do so from now on for any of your questions.

                        So far as I am concerned, this is very rude to someone who chooses to spend time looking at others' questions. I was going to investigate this further for you, but certainly will not do so now. Good luck in choosing who you want to answer what. Bye.

                        ademmlerA Offline
                        ademmlerA Offline
                        ademmler
                        wrote on last edited by ademmler
                        #11

                        @JonB
                        Forgive me please for being the reason for your troubles.
                        As I always have been thank full to you - your advices and comments made me feel like an idiot.
                        Ofcourse I always first search in the documentation, than the web for a working sample.

                        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