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] Crash on OS X when launched by double clicking .app and OK when running the app from terminal
QtWS25 Last Chance

[Solved] Crash on OS X when launched by double clicking .app and OK when running the app from terminal

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 2 Posters 2.0k Views
  • 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.
  • R Offline
    R Offline
    ribtoks
    wrote on last edited by
    #1

    Code is "at Github":https://github.com/Ribtoks/xpiks/tree/master/src/xpiks-qt
    I'm building in Release in Qt Creator 3.3.0 in Qt 5.4. Then running
    macdeployqt xpiks-qt.app -verbose=2 -dmg -executable=xpiks-qt.app/Contents/MacOS/xpiks-qt -qmldir=../xpiks-qt/ -qmldir=../xpiks-qt/Components/ -qmldir=../xpiks-qt/Constants/ -qmldir=../xpiks-qt/Dialogs/ -qmldir=../xpiks-qt/StyledControls/

    Afterwards, builded .dmg file I transfer on other identical OS X Yosemite and try to run it. When runned from terminal from directory Contents/MacOS, everything is ok, but when double-clicked on app bundle, application crashes WHEN i'm opening FileDialog.

    Anybody knows how to fix it?

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

      Hi,

      What does the report dialog say about your 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
      0
      • R Offline
        R Offline
        ribtoks
        wrote on last edited by
        #3

        Eventually nothing useful. I tried to read OS X dump, but found nothing. Report dialog asks me to send report to Apple.

        The thing is that when I run it from terminal, it's able to find all my dialogs and Filedialog

        1 Reply Last reply
        0
        • R Offline
          R Offline
          ribtoks
          wrote on last edited by
          #4

          I guess there's an issue when application is being launched via launchd it can't find some libraries

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

            Did you check that all the libraries you are using are bundled correctly ? That their paths are also set correctly ?

            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
            • R Offline
              R Offline
              ribtoks
              wrote on last edited by
              #6

              Yes, everything was fine. The error was in log file I opened on startup. FileDialog was writing something in console.log and I was redirecting it to file. On writing it crashed. Issue is resolved

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

                Sounds strange, did you use a special location for that file ?

                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
                • R Offline
                  R Offline
                  ribtoks
                  wrote on last edited by
                  #8

                  No, I opened a file with no explicit path (which means in working directory) so it was issue with permissions

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

                    Ok, then QStandardPaths to the rescue to get a more suitable path ?

                    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
                    • R Offline
                      R Offline
                      ribtoks
                      wrote on last edited by
                      #10

                      Yeah, I'll put it in my TODO, but it's not so crucial right now. But thanks

                      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