[Mac] Nightlies crash on start

• Dec 22, 2016 - 20:30
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

I cannot open the latest musescore nightly’s on my mac. (I am able to open just fine the one I had previously opened, MuseScoreNightly-2016-11-14-1527-master-2eb7be1, from mid-November.)

I am having this problem for either of the two most recent nightlies… 53d4ad2, and c65ab20. (Log from latter is below). I get the following error message:

"MuseScoreNightly cannot be opened because of a problem.

Check with the developer to make sure MuseScoreNightly works with this version of OS X. You may need to reinstall the application. Be sure to install any available updates for the application and OS X."

Here is the crash report that is generated:

Click Report to see more detailed information and send a report to Apple.

Process: mscore [3731]
Path: /Applications/MuseScoreNightly.app/Contents/MacOS/mscore
Identifier: org.musescore.MuseScore
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: mscore [3731]
User ID: 501

Date/Time: 2016-12-22 12:18:56.334 -0800
OS Version: Mac OS X 10.11.6 (15G1004)
Report Version: 11
Anonymous UUID: 808BAD2B-919B-1DD8-6A44-EE0AA7099EC9

Sleep/Wake UUID: DE154903-B3E7-41FD-8F86-C8E091BB2508

Time Awake Since Boot: 78000 seconds
Time Since Wake: 8400 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
dyld: launch, loading dependent libraries

Dyld Error Message:
Library not loaded: /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib
Referenced from: /Applications/MuseScoreNightly.app/Contents/Frameworks/libvorbisfile.3.dylib
Reason: image not found

Binary Images:
0x7fff6e988000 - 0x7fff6e9bfa47 dyld (360.22) /usr/lib/dyld
0x7fff8c03d000 - 0x7fff8c08efff com.apple.audio.CoreAudio (4.3.0 - 4.3.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x7fff8f6a6000 - 0x7fff8f6a7ffb libSystem.B.dylib (1226.10.1) <012548CD-614D-3AF0-B3B1-676F427D2CD6> /usr/lib/libSystem.B.dylib
0x7fff8f8c8000 - 0x7fff8f8c8fff com.apple.Carbon (154 - 157) <8F6ED602-5943-3E29-A793-BC331E2C183D> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff90590000 - 0x7fff90590fff com.apple.CoreServices (728.13 - 728.13) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff91731000 - 0x7fff91ba7fff com.apple.CoreFoundation (6.9 - 1258.1) <943A1383-DA6A-3DC0-ABCD-D9AEB3D0D34D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff98a1a000 - 0x7fff98bc0ff7 com.apple.audio.toolbox.AudioToolbox (1.13 - 1.13) <370E95BC-956C-3962-86CC-0A14CF6A0389> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
0x7fff9a9f5000 - 0x7fff9aa48ff7 libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib
0x7fff9b5ac000 - 0x7fff9b5acfff com.apple.audio.units.AudioUnit (1.13 - 1.13) <378B5292-F216-32AB-B628-8C33A72D7052> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit
0x7fff9d859000 - 0x7fff9d8b7fff com.apple.SystemConfiguration (1.14 - 1.14) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fffa0ce7000 - 0x7fffa0cf8ff7 libz.1.dylib (61.20.1) /usr/lib/libz.1.dylib

Model: MacBookPro5,5, BootROM MBP55.00AC.B03, 2 processors, Intel Core 2 Duo, 2.26 GHz, 8 GB, SMC 1.47f2
Graphics: NVIDIA GeForce 9400M, NVIDIA GeForce 9400M, PCI, 256 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435434473353313036374D2E4D3136464B44
Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1067 MHz, 0x859B, 0x435434473353313036374D2E4D3136464B44
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.100.24)
Bluetooth: Version 4.4.6f1 17910, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: TOSHIBA MK3255GSXF, 250.06 GB
Serial ATA Device: MATSHITADVD-R UJ-868
USB Device: USB 2.0 Bus
USB Device: Built-in iSight
USB Device: USB 2.0 Bus
USB Device: Card Reader
USB Device: USB Bus
USB Device: BRCM2046 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: IR Receiver
Thunderbolt Bus:


Comments

Yes, I tried running the -F terminal command, that produced the same error message; I then tried deleting the preference files/directories manually, and I still get the same error. Note my original post contains the log that is produced with the "can't open" error message.

Here is what I get when I run mscore -F (from the appropriate directory):

mscore -F
dyld: Library not loaded: /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib
Referenced from: /Applications/MuseScoreNightly.app/Contents/Frameworks/libvorbisfile.3.dylib
Reason: image not found
Trace/BPT trap

SO -- apparently the latest musescore nightly needs libvorbis.0.dylib, which may be on the developers' machines but isn't on mine. (In fact I have no directory /usr/local/Cellar; possibly I have libvorbis somewhere else, will look). I can see why deleting preference files didn't help!

Further update: I looked for libvorbis.0.dylib, and I see that it is included with MusescoreNightly; it is in:

/Applications/MuseScoreNightly.app/Contents/Frameworks/libvorbis.0.dylib

So apparently there is a pretty simple (but serious) bug in the code in that the invocation of this dylib file points to the wrong place.

I made a soft link linking /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib
to the above location and now MuseScore opens. So, developers, please fix! Thanks.

Title latest nightly's won't open on Mac running El Capitain [Mac] Nightlies won't open

I have the same problem.

Mac 10.11.6 - I don't know if it affects other operating systems (above 10.9?).

lasconic: Thanks for the commit, but it doesn't work for me.

Jojo: I said it's the same because Ron and I seem to have the same log.

libvorbisfile.3.dylib doesn't reference correctly libvorbis and I don't know why.
In 2.1 branch it works correctly and in master it doesn't. I believe it's the job of macdeployqt to fix the reference and I guess the Qt 5.6 version doesn't do while the Qt 5.4 version does it... We could try with Qt 5.8 as a soon as it's released.

It would be great to know where it started to stop working, maybe when we changed to Qt 5.6.2. 3 months ago... https://github.com/musescore/MuseScore/commit/9716e70d7e1f02124192d1414…

I managed to reproduce the problem and I compared a 3.0-dev Nightly and a 2.1-dev Nightly; only the 3.0-dev Nightly crashed at startup.
I am attaching the "otool -L" log of the two applications, and of the problematic libraries.
In particular, for [...]/Frameworks/libvorbisfile.3.dylib we have:
for 3.0-dev:
./libvorbisfile.3.dylib:
@executable_path/../Frameworks/libvorbisfile.3.dylib (compatibility version 7.0.0, current version 7.7.0)
/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.8.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
@executable_path/../Frameworks/libogg.0.dylib (compatibility version 9.0.0, current version 9.2.0)
for 2.1-dev:
./libvorbisfile.3.dylib:
@executable_path/../Frameworks/libvorbisfile.3.dylib (compatibility version 7.0.0, current version 7.7.0)
@executable_path/../Frameworks/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.8.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
@executable_path/../Frameworks/libogg.0.dylib (compatibility version 9.0.0, current version 9.2.0)

So I think that the problem is not in MuseScore itself, but in the dylib library which is included at packaging time.
Do the 3.0-dev and 2.1-dev share the same Homebrew and Mac OS versions?

Attachment Size
log21.txt 5.7 KB
log30.txt 6.24 KB

I tried to force more output from the build log:
https://travis-ci.org/AntonioBL/MuseScore/jobs/193789746

It seems that macdeployqt is searching the libraries in folder /usr/local/opt/
Indeed in the log we have:

Log: copied: "/usr/local/opt/libvorbis/lib/libvorbisfile.3.dylib"
Log: to "/Volumes/MuseScoreNightly-macprova-fbc1004/mscore.app/Contents/Frameworks//libvorbisfile.3.dylib"

But then inside some of the libraries (and libvorbisfile.3.dylib) there are references to libraries in another folder: /usr/local/Cellar
For example the log says:

Log: Using otool:
Log: inspecting "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"

when analyzing the dependencies of /usr/local/opt/libvorbis/lib/libvorbisfile.3.dylib

Then only the libraries beginning with path /usr/local/opt/ are properly patched. In the example, the deploy tool tries to patch /usr/local/opt/libvorbis/lib/libvorbis.0.dylib, but this reference does not exist inside libvorbisfile.3.dylib:

Log: change reference "/usr/local/opt/libvorbis/lib/libvorbis.0.dylib"
Log: to "@executable_path/../Frameworks/libvorbis.0.dylib"

In summary I think there could be a problem in macdeployqt or a possible mismatch in Homebrew installation, but in this latter case we would see the same also for 2.1-dev.
It would be interesting to see a verbose macdeployqt also for 2.1-dev (here what I added to see the log: https://github.com/AntonioBL/MuseScore/commit/fbc1004f9f6b ).

I hope this analysis helps in solving the problem. In attachment to this post the macdeployqt log file.

Attachment Size
macdeployqt_log.zip 24.06 KB

And finally I found what is actually happening.
See here:
https://bugreports.qt.io/browse/QTBUG-56814

The fault seems to be 50% Qt and 50% Homebrew: in Homebrew libraries, the install name inside the library points to a symlink "/usr/local/opt/[...]", and the actual library is in "/usr/local/Cellar/[...]". Inside Homebrew libraries, other libraries are referred to with their absolute path, i.e. "/usr/local/Cellar/[...]". Macdeployqt replaces inside the deployed libraries the "install name" with a reference to the bundled framework, and as seen in the above comment this does not work because in the dylib it is stored the actual absolute path to the library.

Indeed, from the macdeployqt log of 3.0-dev and 2.1-dev we have:

2.1-dev
Log: Adding framework:
Log: Framework name "libvorbis.0.dylib"
Framework directory "/usr/local/Cellar/libvorbis/1.3.5/lib/"
Framework path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Binary directory "/usr/local/Cellar/libvorbis/1.3.5/lib/"
Binary name "libvorbis.0.dylib"
Binary path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Version ""
Install name "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Deployed install name "@executable_path/../Frameworks/libvorbis.0.dylib"
Source file Path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Framework Destination Directory (relative to bundle) "Contents/Frameworks/"
Binary Destination Directory (relative to bundle) "Contents/Frameworks/"


3.0-dev
Log: Adding framework:
Log: Framework name "libvorbis.0.dylib"
Framework directory "/usr/local/Cellar/libvorbis/1.3.5/lib/"
Framework path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Binary directory "/usr/local/Cellar/libvorbis/1.3.5/lib/"
Binary name "libvorbis.0.dylib"
Binary path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Version ""
Install name "/usr/local/opt/libvorbis/lib/libvorbis.0.dylib"
Deployed install name "@executable_path/../Frameworks/libvorbis.0.dylib"
Source file Path "/usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib"
Framework Destination Directory (relative to bundle) "Contents/Frameworks/"
Binary Destination Directory (relative to bundle) "Contents/Frameworks/"

This is apparently not yet solved in newer Qt versions.

@Isaac this crashlog is different. Try to run MuseScore with -F. I tested the patch and it seems to work here. At least otool output is ok. I will merge it so we can try a nightly.

Status (old) fixed active

I can't get it to start normally (see attached log).

I then opened Terminal, dragged mscore (within MacOS) onto it, typed -F and pressed enter.

It complains this:

dyld: Library not loaded: /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib
Referenced from: /Applications/MuseScore/3.0/MuseScoreNightly.app/Contents/Frameworks/libvorbisenc.2.dylib
Reason: image not found
Trace/BPT trap: 5

Using 6fdce0a - Mac 10.11.6.

Attachment Size
Cannot load 3.0 nightly [Log].txt 9.8 KB

FWIW, in the first place, I don't think there is an issue with direct dependencies, but only with dependencies of dependencies.
The very first trace mentions libvorbisfile

Library not loaded: /usr/local/Cellar/libvorbis/1.3.5/lib/libvorbis.0.dylib
Referenced from: /Applications/MuseScoreNightly.app/Contents/Frameworks/libvorbisfile.3.dylib
Reason: image not found

Tested MuseScoreNightly-2017-02-19-0847-2.1-e6a9100.dmg and one of the 3.0 versions from yesterday.
They both work now.
Thank you!