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. Deployment problem on MAC OSX with macdeployqt Qt5.4.2 (and 5.3.2)
Forum Updated to NodeBB v4.3 + New Features

Deployment problem on MAC OSX with macdeployqt Qt5.4.2 (and 5.3.2)

Scheduled Pinned Locked Moved Solved Installation and Deployment
35 Posts 2 Posters 13.5k 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.
  • S Offline
    S Offline
    stephane78
    wrote on last edited by
    #1

    Hi,
    I have made the mac version of a Qt app.the app runs well but if I use macdeployQt the app crashes :

     Process:               neobe [90279]\
    Path:                  /Users/USER/*/neobe.app/Contents/MacOS/neobe\
    Identifier:            com.dropcloud.neobe\
    Version:               ???\
    Code Type:             X86-64 (Native)\
    Parent Process:        ??? [1]\
    Responsible:           neobe [90279]\
    User ID:               501\
    \
    Date/Time:             2016-05-13 15:05:26.842 +0200\
    OS Version:            Mac OS X 10.10.4 (14E46)\
    Report Version:        11\
    Anonymous UUID:        06CA5466-106C-0CAA-8D38-69F4AA0B0DC5\
    \
    Sleep/Wake UUID:       FAA27C1A-4249-405F-908E-9EBD13A6BB6F\
    \
    Time Awake Since Boot: 520000 seconds\
    Time Since Wake:       84000 seconds\
    \
    Crashed Thread:        0  Dispatch queue: com.apple.main-thread\
    \
    Exception Type:        EXC_CRASH (SIGABRT)\
    Exception Codes:       0x0000000000000000, 0x0000000000000000\
    \
    Application Specific Information:\
    abort() called\
    \
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread\
    0   libsystem_kernel.dylib        	0x00007fff982c5286 __pthread_kill + 10\
    1   libsystem_c.dylib             	0x00007fff8b318b53 abort + 129\
    2   org.qt-project.QtCore         	0x000000010bb9b119 0x10bb78000 + 143641\
    3   org.qt-project.QtCore         	0x000000010bb9c5d1 QMessageLogger::fatal(char const*, ...) const + 161\
    4   org.qt-project.QtGui          	0x000000010b645247 QGuiApplicationPrivate::createPlatformIntegration() + 6359\
    5   org.qt-project.QtGui          	0x000000010b64526b QGuiApplicationPrivate::createEventDispatcher() + 27\
    6   org.qt-project.QtCore         	0x000000010bdb6901 QCoreApplication::init() + 113\
    7   org.qt-project.QtCore         	0x000000010bdb6877 QCoreApplication::QCoreApplication(QCoreApplicationPrivate&) + 39\
    8   org.qt-project.QtGui          	0x000000010b6426de QGuiApplication::QGuiApplication(QGuiApplicationPrivate&) + 14\
    9   org.qt-project.QtWidgets      	0x000000010b01155e QApplication::QApplication(int&, char**, int) + 206\
    10  com.dropcloud.neobe           	0x000000010a4a54fd main + 45\
    11  com.dropcloud.neobe           	0x000000010a3deeb4 start + 52\
    \
    Thread 1:: Dispatch queue: com.apple.libdispatch-manager\
    0   libsystem_kernel.dylib        	0x00007fff982c6232 kevent64 + 10\
    1   libdispatch.dylib             	0x00007fff914dfa6a _dispatch_mgr_thread + 52\
    \
    Thread 2:\
    0   libsystem_kernel.dylib        	0x00007fff982c594a __workq_kernreturn + 10\
    1   libsystem_pthread.dylib       	0x00007fff9746c40d start_wqthread + 13\
    \
    Thread 3:\
    0   libsystem_kernel.dylib        	0x00007fff982c594a __workq_kernreturn + 10\
    1   libsystem_pthread.dylib       	0x00007fff9746c40d start_wqthread + 13\
    \
    Thread 4:\
    0   libsystem_kernel.dylib        	0x00007fff982c594a __workq_kernreturn + 10\
    1   libsystem_pthread.dylib       	0x00007fff9746c40d start_wqthread + 13\
    \
    Thread 5:\
    \
    Thread 0 crashed with X86 Thread State (64-bit):\
      rax: 0x0000000000000000  rbx: 0x0000000000000006  rcx: 0x00007fff558252b8  rdx: 0x0000000000000000\
      rdi: 0x000000000000130f  rsi: 0x0000000000000006  rbp: 0x00007fff558252e0  rsp: 0x00007fff558252b8\
       r8: 0x00007fff55825220   r9: 0x00007fff7b97f300  r10: 0x0000000008000000  r11: 0x0000000000000206\
      r12: 0x000000010beadc88  r13: 0x00007fdfb950bd00  r14: 0x00007fff7b97f300  r15: 0x00007fff55825ca8\
      rip: 0x00007fff982c5286  rfl: 0x0000000000000206  cr2: 0x00007fff79bccfd8\
      \
    Logical CPU:     0\
    Error Code:      0x02000148\
    Trap Number:     133\
    \
    \
    Binary Images:\
           0x10a3da000 -        0x10ac03ff7 +com.dropcloud.neobe (???) <E0B91518-41C7-3D36-821D-5092F70221B8> /Users/USER/*/neobe.app/Contents/MacOS/neobe\
           0x10ad5c000 -        0x10af101e7 +libcrypto.1.0.0.dylib (0) <D23BE80E-993C-3905-A3A8-6D7E8D972277> /Users/USER/*/neobe.app/Contents/Frameworks/libcrypto.1.0.0.dylib\
           0x10af79000 -        0x10afbaff7 +libssl.1.0.0.dylib (0) <EAB38A56-AA4B-3D46-86CF-1B0D75E611C1> /Users/USER/*/neobe.app/Contents/Frameworks/libssl.1.0.0.dylib\
           0x10afd5000 -        0x10afe0ff7 +librsync.2.dylib (0) <1B3148B1-C683-3791-B7FA-614BC78BFB33> /Users/USER/*/neobe.app/Contents/Frameworks/librsync.2.dylib\
           0x10afe5000 -        0x10b4efff7 +org.qt-project.QtWidgets (5.4 - 5.4.2) <91FA984A-1421-3E72-838A-19294F0BB2EA> /Users/USER/*/neobe.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets\
           0x10b625000 -        0x10baa0ff7 +org.qt-project.QtGui (5.4 - 5.4.2) <FC22DB61-DAD1-3E0C-9A39-5079429C8E96> /Users/USER/*/neobe.app/Contents/Frameworks/QtGui.framework/Versions/5/QtGui\
           0x10bb78000 -        0x10c083fff +org.qt-project.QtCore (5.4 - 5.4.2) <56D39D2C-8220-3185-986B-D20776C1EEE5> /Users/USER/*/neobe.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore\
           0x10c111000 -        0x10c14afff +org.qt-project.QtXml (5.4 - 5.4.2) <0442022C-1ABA-3229-BB2C-C072232D2FF2> /Users/USER/*/neobe.app/Contents/Frameworks/QtXml.framework/Versions/5/QtXml\
           0x10c15e000 -        0x10c277ff7 +org.qt-project.QtNetwork (5.4 - 5.4.2) <1F11ED82-B81D-3C64-8471-E7C59AAA73D4> /Users/USER/*/neobe.app/Contents/Frameworks/QtNetwork.framework/Versions/5/QtNetwork\
           0x10c2ad000 -        0x10c2dafff +org.qt-project.QtSql (5.4 - 5.4.2) <E15BB91E-B30D-3028-917D-C1163485A07A> /Users/USER/*/neobe.app/Contents/Frameworks/QtSql.framework/Versions/5/QtSql\
           0x10c2ee000 -        0x10c2f2fff  com.apple.agl (3.3.0 - AGL-3.3.0) <4E8F579B-A2E2-3A27-96D7-02A9465A78D8> /System/Library/Frameworks/AGL.framework/Versions/A/AGL\
           0x10c2ff000 -        0x10c305ff7 +libpopt.0.dylib (0) <CC9E3F11-11E7-381A-A543-651D0494F665> /Users/USER/*/neobe.app/Contents/Frameworks/libpopt.0.dylib\
           0x10dd2d000 -        0x10ddd3fff +libqcocoa.dylib (0) <6ADB44BB-79DB-3948-8C8D-BBB20F0B7B51> /Users/USER/*/libqcocoa.dylib\
           0x10de2f000 -        0x10e2aaff7 +org.qt-project.QtGui (5.4 - 5.4.2) <FC22DB61-DAD1-3E0C-9A39-5079429C8E96> /Users/USER/*/QtGui.framework/Versions/5/QtGui\
           0x10e3e1000 -        0x10e8ecfff +org.qt-project.QtCore (5.4 - 5.4.2) <56D39D2C-8220-3185-986B-D20776C1EEE5> /Users/USER/*/QtCore.framework/Versions/5/QtCore\
    
    

    This app use the openssl dynamic libs and dynamic librsync.the app is linked too statically with the library chilkat.because I couldn't build with it dynamically.and the app uses Qtcore,Qtgui,Qtwidgets,Qtnetwork,QtSql(plugin sqlite),and Qxml.I have only the sql plugin of sqlite.
    I use Qt5.4.2 but I have tried with Qt5.3.2 too.

    I have not this problem with another app that uses only openssl and qtcore,qtgui,qtwidgets and qtnetworks.

    I have used otool -L to see the dynamic libraries used by the app but it didn't learned me more ....
    tha app runs well if I don't do macdeployqt.

    Who has an idea to solve my problem?

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

      Hi,

      Can you start the application once bundled from the command line ? You might get some more information about the crash.

      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
      1
      • S Offline
        S Offline
        stephane78
        wrote on last edited by stephane78
        #3

        @SGaist, Hi thanks, here is the information command line :

         Class NotificationReceiver is implemented in both /Users/lionel/neobe5.4.2/neobe.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets and /Users/lionel/Qt5.4.2/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets. One of the two will be used. Which one is undefined.\
        QObject::moveToThread: Current thread (0x7fccc043a180) is not the object's thread (0x7fccc0477b30).\
        Cannot move to target thread (0x7fccc043a180)\
        \
        You might be loading two sets of Qt binaries into the same process. Check that all plugins are compiled against the right Qt binaries. Export DYLD_PRINT_LIBRARIES=1 and check that only one set of binaries are being loaded.\
        This application failed to start because it could not find or load the Qt platform plugin "cocoa".\
        \
        Available platform plugins are: cocoa, minimal, offscreen.\
        \
        Reinstalling the application may fix this problem.\
        Abort trap: 6}
        

        it seems that there is a problem with the plugin cocoa. the plugin platform cocoa is in the app,so I don't understand this message.the plugin is in Contents/PlugIns/platforms.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          stephane78
          wrote on last edited by
          #4

          And I don't understand, because I have made another package/app with macdeployqt that uses the plugin cocoa too and there isn't any problem with this another app.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stephane78
            wrote on last edited by stephane78
            #5

            -I have tried by putting the plugins subdirectories in the MacOS subdirectory of the bundle. it does nothing.
            -The declaration of QApplication is the first line of the main function in the program
            -I have modified the qt.conf file and I have still the error

            so I don't know from what comes this error now

            1 Reply Last reply
            0
            • S Offline
              S Offline
              stephane78
              wrote on last edited by
              #6

              Hi, my problem was solved with Qt5.6.....

              1 Reply Last reply
              0
              • S Offline
                S Offline
                stephane78
                wrote on last edited by
                #7

                I think this problem comes from the SQL plugins,because I have an error on two libraries (libmysqlclient and libpq) when I run macdeployqt with Qt5.4.2 and Qt5.6.0 but the bundle crashes with Qt5.4.2 and the bundle is OK with Qt5.6.0. With Qt5.4.2 I had tried to remove the plugins other than sqlite (I use sqlite) from Qt installattion and then run macdeployqt but it crashes with unable to find or load plugin cocoa.
                But my problem is solved I will use the Qt5.6.0 version for this application on MacOs.

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

                  IIRC, there's been several fixes in between to macdeployqt that might be related to that.

                  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
                  • S Offline
                    S Offline
                    stephane78
                    wrote on last edited by
                    #9

                    the package crashes on another Mac but I have not this other Mac here today and I cannot see the command line information.I think there are libraries of /usr/lib like libc++ or others or OpenGl that are not installed on this another mac.
                    Can I add libraries (of /usr/lib or other) to the bundle ?

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

                      What exact libraries are missing ?

                      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
                      • S Offline
                        S Offline
                        stephane78
                        wrote on last edited by stephane78
                        #11

                        @SGaist, Hi , I don't know if it comes from a missing library and I am not sure because the error message is :
                        QSqlError("-1", "Error opening database", "out of memory")

                        failed to connect.

                        Abort trap: 6
                        we use sqlite in the software and the plugin is in the bundle.
                        I have freed memory and even with 4Gb free memory I have this message
                        this is not a development Mac, and it is with MacOS 10.11.3 and 8 GB memory
                        I have copied the software on the desktop and I run it in command line.
                        On two other (developments) Mac the software is ok.

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

                          AFAIK, that's unrelated.

                          Where are your trying to open your database ?
                          Do you check that the open operation is successful before calling a query on it ?

                          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
                          1
                          • S Offline
                            S Offline
                            stephane78
                            wrote on last edited by
                            #13

                            Hi, @SGaist , I must add a new QMessageBox in the case it doesn't find the sqlite driver.
                            I think this case comes when it creates the log database and if it doesn't find the sqlite driver and then cannot open the database or when it opens the log database (if the file already exists and is corrupted).

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              stephane78
                              wrote on last edited by
                              #14

                              @SGaist ,I have added a QMessageBox, if it doesn't find the sqldriver plugin and I have done an otool -L on the sqlite plugin and I have seen that it is linked with the libc++1.dylib and libSystemB.dylib.
                              is it possible that this two libraries are not on the Mac (10.11.3) or are not compatible with those of my development Mac (10.10.4) ?

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                stephane78
                                wrote on last edited by
                                #15

                                @SGaist, HI, I have the same problem on a VM with an older MacOS(10.9),so I have the problem on 2 MacOSes where Qt was not installed before...so I think it needs a library or there is a problem with the bundle.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  stephane78
                                  wrote on last edited by
                                  #16

                                  @SGaist, I have added Libraries = Frameworks to the qt.conf and I will test it on the VM

                                  1 Reply Last reply
                                  0
                                  • S Offline
                                    S Offline
                                    stephane78
                                    wrote on last edited by
                                    #17

                                    @SGaist, Hi it does nothing.
                                    I have now added libsqlite3.dylib to the bundle and it is not ok .
                                    but my bundle contains other qt sql plugins and perhaps should I remove them (mysql,postgres,odbc) of the bundle ?
                                    I have tested without the other plugins in the bundle and I have still this error....

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      stephane78
                                      wrote on last edited by
                                      #18

                                      the software runs on two developments MacOs (with Qt and Xcode) and crashes on two other MacOS without Qt and Xcode.....

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        stephane78
                                        wrote on last edited by stephane78
                                        #19

                                        @SGaist, Hi, When I use macdeployqt (Qt5.6.0) I have this errors and warning :

                                        WARNING: Plugin "libqsqlodbc.dylib" uses private API and is not Mac App store compliant.
                                        WARNING: Plugin "libqsqlpsql.dylib" uses private API and is not Mac App store compliant.
                                        ERROR: no file at "/opt/local/lib/mysql55/mysql/libmysqlclient.18.dylib"
                                        ERROR: no file at "/usr/local/lib/libpq.5.dylib"

                                        but I use only the sqlite plugin

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

                                          Just remove the plugins you won't use.

                                          Where did you put the SQLite library ?

                                          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
                                          1

                                          • Login

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