Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [solved] My app crashed after using macdeployqt (Qt5.2 RC 1)
Forum Updated to NodeBB v4.3 + New Features

[solved] My app crashed after using macdeployqt (Qt5.2 RC 1)

Scheduled Pinned Locked Moved Installation and Deployment
48 Posts 2 Posters 22.7k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #37

    Are you using QDir::currentPath ?

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

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gaojinhsu
      wrote on last edited by
      #38

      no, but the following code has been added to main.cpp already,

      @int main(int argc, char *argv[])
      {

      QApplication a(argc, argv);
      
      QDir dir(QCoreApplication::applicationDirPath());
      qDebug()<<dir.absolutePath();
      dir.cdUp();
      qDebug()<<dir.absolutePath();
      dir.cd("PlugIns");
      qDebug()<<dir.absolutePath();
      QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
      qDebug()<<QCoreApplication::libraryPaths();@
      

      and the relevant application output

      @"/Users/gint_develop/Documents/maserati/branches/build-OneChecker-Desktop_Qt_5_2_0_clang_64bit-Release/OneChecker/1Checker.app/Contents/MacOS"
      "/Users/gint_develop/Documents/maserati/branches/build-OneChecker-Desktop_Qt_5_2_0_clang_64bit-Release/OneChecker/1Checker.app/Contents"
      "/Users/gint_develop/Documents/maserati/branches/build-OneChecker-Desktop_Qt_5_2_0_clang_64bit-Release/OneChecker/1Checker.app/Contents/PlugIns"
      ("/Users/gint_develop/Documents/maserati/branches/build-OneChecker-Desktop_Qt_5_2_0_clang_64bit-Release/OneChecker/1Checker.app/Contents/PlugIns") @

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gaojinhsu
        wrote on last edited by
        #39

        Also, Here is another important clue,
        @This application failed to start because it could not find or load the Qt platform plugin "cocoa".@
        maybe the reference pointing to the platform plugin in the bundle is broken, and QCoreApplication::libraryPaths() is not used to search for platform plugins , as" what he said":https://bugreports.qt-project.org/browse/QTBUG-29503

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

          Can you build Qt from sources and use this one to create your application ? I didn't have that problem with a current git build

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gaojinhsu
            wrote on last edited by
            #41

            Actually,I got stuck when I tried to build Qt from source. Particularly, they were some errors about webkit...I am trying to solve it.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gaojinhsu
              wrote on last edited by
              #42

              I followed these steps again:
              1)git clone git://gitorious.org/qt/qt5.git qt5
              2) cd qt5
              3) ./init-repository
              4) ./qtrepotools/bin/qt5_tool -p
              5) .........

              but got this at step 4,

              Entering 'qtactiveqt'
              Fetching origin
              Fetching gerrit
              ssh: connect to host codereview.qt-project.org port 22: Operation timed out
              fatal: Could not read from remote repository.

              Please make sure you have the correct access rights
              and the repository exists.
              error: Could not fetch gerrit
              Stopping at 'qtactiveqt'; script returned non-zero status.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gaojinhsu
                wrote on last edited by
                #43

                seems I'm not alone. someone has posted it "Here":https://bugreports.qt-project.org/browse/QTBUG-21139 ,but no reply.

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gaojinhsu
                  wrote on last edited by
                  #44

                  I've downloaded qt5.2 source code and built it successfully. but it makes no difference.
                  [quote author="SGaist" date="1388791987"]Can you build Qt from sources and use this one to create your application ? I didn't have that problem with a current git build[/quote]

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

                    Do you mean, the source tar.gz or from git ?

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

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gaojinhsu
                      wrote on last edited by
                      #46

                      The former, the problem is still there when I try to git.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gaojinhsu
                        wrote on last edited by
                        #47

                        Provisional measures :
                        adding the following code to main.cpp (before QApplication a(argc, argv));

                        I think the path of loading plugins has to be loaded before running QApplication a(argc, argv);
                        @int main(int argc, char *argv[])
                        {
                        QString path = QString(argv[0]);
                        QString end = path.split("/").last();
                        path.remove(path.length() - end.length(), end.length());
                        QDir dir(path);
                        dir.cdUp();
                        dir.cd("PlugIns");
                        QApplication::setLibraryPaths(QStringList(dir.absolutePath()));

                        QApplication a(argc, argv);
                        

                        ......
                        @

                        [quote author="SGaist" date="1388791987"]Can you build Qt from sources and use this one to create your application ? I didn't have that problem with a current git build[/quote]

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

                          Wasn't that part of a bug report ?

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

                          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