MacOS: FreeCAD 0.17.12322 Qt5 not starting

Having trouble installing or compiling FreeCAD? Get help here.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by blacey »

M-Rick wrote: Tue Nov 14, 2017 6:37 pm But the latest version 12593 doesn't…
It's a Python library related error:
I can get it running on my MBA, so I'm gonna try to set again. Matplotlib and PySide packages are the ones provides by Kyngchaos for QGIS.
M-Rick,

I just downloaded 12595 and it worked flawlessly.

Code: Select all

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12595 (Git)
Build type: Release
Branch: (HEAD detached at 8c7bb0c)
Hash: 8c7bb0cd551cf11551ff71d716a16211c6d5e13d
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
We run regression tests in a continuous integration environment across all supported platforms including macOS. You can see the latest macOS build here - https://travis-ci.org/FreeCAD/FreeCAD/jobs/302139750 that ran all the tests successfully.

Furthermore, all of the application dependencies are packaged in the FreeCAD bundle so the matplotlib and PySide packages you mentioned should not matter. FYI, we use matplotlib 2.0.2 on macOS and a development version of PySide2 that is required for Qt5.

It seems that there must be something specific to your environment that is affecting the application library loading/execution. I vaguely recall users having issues when they had MacPorts installed but I thought we resolved it and don't recall the specifics. The point being, we have seen environment issues in the past, so they can happen.

This seems very suspect:
M-Rick wrote: Tue Nov 14, 2017 6:37 pm During initialization the error Matplotlib qt-based backends require an external PyQt4, PyQt5,
or PySide package to be installed, but it was not found. occurred in /Users/aymeric/Library/Preferences/FreeCAD/Mod/Animation/InitGui.py
Try moving the Animation directory located in /Users/aymeric/Library/Preferences/FreeCAD/Mod/ somewhere outside ~/Library/Preferences/FreeCAD to see if it resolves the issue - you may have an old, non-compatible Animation module installed.

If removing the Animation module doesn't resolve the issue, then given you are seeing an issue with python, it is important to confirm that the application is using the python 2.7 interpreter and dependent site-packages/libraries that are bundled within FreeCAD.app and not the system python or a separately installed python or site-packages. You can use the following command, after you CD to the directory where you placed the FreeCAD.app, to confirm the loaded dependencies:

Code: Select all

DYLD_PRINT_LIBRARIES=1 ./FreeCAD/Contents/MacOS/FreeCAD
I see the following on my system:

Code: Select all

[blacey@bbl ~]$ DYLD_PRINT_LIBRARIES=1 ./FreeCAD.app/Contents/MacOS/FreeCAD 2>&1 | grep python
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_locale.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_io.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/strop.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/itertools.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/operator.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_collections.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_heapq.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/binascii.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/datetime.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/cStringIO.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/pyexpat.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/PySide2/QtCore.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/PySide2/QtGui.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/PySide2/QtWidgets.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/math.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/core/multiarray.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/core/umath.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_ctypes.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_struct.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/cPickle.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_functools.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/time.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/zlib.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/bz2.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/grp.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_hashlib.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/../../libssl.1.0.0.dylib
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/../../libcrypto.1.0.0.dylib
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_random.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/fcntl.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/future_builtins.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/site-packages/numpy/random/mtrand.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_socket.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_ssl.so
dyld: loaded: /Users/blacey/FreeCAD.app/Contents/lib/python2.7/lib-dynload/_scproxy.so
Hope this helps.
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by chrisb »

Deleting (or temporary moving) everything in the config directory ~/Library/Preferences/FreeCAD is always worth a try.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by chrisb »

And here we are again: The size suggests that some libs are missing:

FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg, size 187 MB
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by blacey »

chrisb wrote: Wed Nov 22, 2017 9:54 pm And here we are again: The size suggests that some libs are missing:

FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg, size 187 MB
Maybe something happened with your download for GitHub?

1. The best place to look for a root cause is the Travis job, however all tests passed successfully and Travis uploaded the full archive to GitHub without error - https://travis-ci.org/FreeCAD/FreeCAD/j ... 7786-L7798

Code: Select all

Your image is ready:
FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg
/Users/travis/.travis/job_stages: line 99: shell_session_update: command not found
Asset FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg [5421364] already exists will be replaced.
Determining asset upload url for release: 0.17_pre
Deploying release asset /Users/travis/build/FreeCAD/FreeCAD/build/FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg to https://uploads.github.com/repos/FreeCAD/FreeCAD/releases/4912461/assets...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  255M    0  1332  100  255M     59  11.5M  0:00:22  0:00:22 --:--:-- 1234k
Cataloging assets for release 0.17_pre on GitHub FreeCAD/FreeCAD that match filter -Qt5
Found 1 assets matching filter -Qt5 (listed in reverse chronological order):
Retain 1: FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg [5423674] created: 2017-11-22T22:55:50Z
2. Checking GitHub, I see an image that the is 256MB
GitHubReleases.jpg
GitHubReleases.jpg (79.31 KiB) Viewed 1713 times
3. Downloading the file, I see the right size as well

Code: Select all

[blacey@bbl ~/Downloads]$ ls -lh FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg 
-rw-r--r--@ 1 blacey  staff   256M Nov 22 16:09 FreeCAD_0.17-12636.83f7f85-OSX-x86_64-Qt5.dmg
Try re-downloading from GitHub to see if you have better results.
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by peterl94 »

That is because that is a new build that worked. I restarted the build right after I saw chrisb's post.

There is an actual problem that has been going on for a long time. I don't fully understand it, but sometimes the bundler script fails to find libjpeg that is referenced by some library and exits which is what causes the incomplete bundle. I think the tests still pass because the libraries still have absolute path references. The times I have looked at the log when the problem has occurred, it looks like the ports cache download was terminated for some reason.

I'm not sure how far back the travis logs go, but if you can find a log of an earlier problem build mentioned in this thread, you could see what I'm talking about.
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by blacey »

peterl94 wrote: Thu Nov 23, 2017 12:32 am That is because that is a new build that worked. I restarted the build right after I saw chrisb's post.
Ah, thanks Peter! That indeed explains it.
peterl94 wrote: Thu Nov 23, 2017 12:32 am There is an actual problem that has been going on for a long time. I don't fully understand it, but sometimes the bundler script fails to find libjpeg that is referenced by some library and exits which is what causes the incomplete bundle. I think the tests still pass because the libraries still have absolute path references. The times I have looked at the log when the problem has occurred, it looks like the ports cache download was terminated for some reason.

I'm not sure how far back the travis logs go, but if you can find a log of an earlier problem build mentioned in this thread, you could see what I'm talking about.
I sifted through several logs but didn't find a representative failure - perhaps the next time it happens, you or someone else can post here and I will take a look at it...
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by chrisb »

Thanks for the rebuild and taking care of the problem. Usually I don't update each version but I will have a daily look in the near future and post here if I see a problem.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
M-Rick
Posts: 39
Joined: Fri Aug 22, 2014 1:03 pm

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by M-Rick »

I got the reason why I had troubles launching nightlies of FreeCAD, as I reported previously.

On the Mac, when I was trying the latest working versions, FreeCAD was located in a folder containing accented letters in its name.
Last edited by M-Rick on Wed Nov 29, 2017 9:34 pm, edited 2 times in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by Kunda1 »

Sounds like issue #2973
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: MacOS: FreeCAD 0.17.12322 Qt5 not starting

Post by chrisb »

Current version did it again:

FreeCAD_0.17-12804.f919eb6-OSX-x86_64-Qt5.dmg 188MB
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply