[Solved] Crash on OS X when launched by double clicking .app and OK when running the app from terminal
-
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?
-
Hi,
What does the report dialog say about your crash ?
-
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
-
I guess there's an issue when application is being launched via launchd it can't find some libraries
-
Did you check that all the libraries you are using are bundled correctly ? That their paths are also set correctly ?
-
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
-
Sounds strange, did you use a special location for that file ?
-
No, I opened a file with no explicit path (which means in working directory) so it was issue with permissions
-
Ok, then QStandardPaths to the rescue to get a more suitable path ?
-
Yeah, I'll put it in my TODO, but it's not so crucial right now. But thanks