No sound on Mac, I/O's PortAudio API drop down menu empty

• Jul 21, 2017 - 18:17
Reported version
2.2
Type
Graphical (UI)
Severity
S3 - Major
Status
closed
Project
Tags

I have two serious bugs with musescore that make it completely unusable for me to use right now:
1. Whenever it goes to the 'create new composition' screen, it crashes instantly.
2. Playback doesn't work at all. The bar is greyed out, and clicking on the notes doesn't do anything either

Can someone help me? I've tried updating to the latest 2.1 for Mac El Capitan, and not even restoring to factory settings worked.

GIT commit: 871c8ce


Comments

I see mention of the Facebook plugin prominently in the crash log. Apparently this is known to not be compatible with current versions of macOS and causes crashes in programs that attempt to display web pages (as we do in the Start Center). Uninstall that plugin and try again.

See for example https://musescore.org/en/node/38481

This solved the problem of musescore crashing at the start center, so thanks a lot! However, the playback still isn't working. It's still greyed out and everything.

So basically, nothing drops down at all for me when I click where it says API. I don't have any options at all in the PortAudio. Is it simply not picking up any audio drivers?

Also, some other things to note:
1. The synthesizer tool is greyed out, and the play panel just doesn't appear.
2. I've tried uninstalling and reinstalling 2.0.3, and had the same problems
3. I've tried installing more soundfonts, that didn't work either.

Could you try to run the following in a Terminal?
/Applications/MuseScore\ 2.app/Contents/MacOS/mscore -d

Then paste the output on https://pastebin.com/ or somewhere else and link to it in a comment.

Portaudio cannot find any sound output, so something is preventing it to do so... We need to find which software does that.

https://pastebin.com/K7D8YhsF

I also attached a couple of screenshots I think are relevant to the problem.

BTW, I forgot to mention, but I do have a Wacom tablet set up with my computer. I don't have it plugged in at the moment and the problem still persists, but I've heard that having the Wacom driver installed could cause problems with it, is that true?

So the culprit is here
https://github.com/EddieRingle/portaudio/blob/9eb5f0b3d820a81d385504d9c…

Portaudio tries to "FindNextComponent" with this particular description. In most cases, it will find the default audio output Audio Unit provided by Apple kAudioUnitSubType_HALOutput. In your case, it doesn't.
No idea why :-/ It could be that your MacOS installation is corrupted, or another software is "hiding" this default output AU.

My understand is that this AU is used to list the devices, and to deal with the sampling rate conversion and audio output. If portaudio can't find it, it can't work and so it exits with an error and MuseScore cannot output sound.

So we have this issue with AUHAL component not found.. Apparently we had it also with MuseScore 2.0.3.1 and MuseScore 2.0.3 etc...
(Maybe https://musescore.org/en/node/214656)

We have another issue apparently in MuseScore 2.1 since some users mentioned 2.1 is not working but 2.0.3(.1) was.
https://musescore.org/en/node/207146#comment-725166

Then we have other users with 2.1 installed but it stopped working. See https://musescore.org/en/node/226621

If you do support in the forum, please ask these people to run MuseScore with -d and report with the output (pasted on pastebin.com for example). Also ask the full mac config, type of mac, full OS version. We want to make sure it's the same AUHAL error and not something else. And we want to have as much information as possible.

One more thing (to be completed)

MuseScore 1.3
using PortAudio Version: PortAudio V19-devel (built Feb 23 2012)

MuseScore 2.0.2
using PortAudio Version: PortAudio V19-devel (built Dec 21 2014 18:55:58)

MuseScore 2.0.3.1
using PortAudio Version: PortAudio V19-devel (built Dec 21 2014 18:55:58)

MuseScore 2.1
using PortAudio Version: PortAudio V19-devel (built May 2 2016 17:40:16)

Again this "Init midi driver failed"and nothing else. Do you have any special hardware? Bluetooth speaker/headphone? external soundcard ?

Setup:
MacBook 2015
Sierra 10.12.6
MuseScore 2.1.0
PortAudio API: Core Audio
Device: Built-in Output

Issue:
No audio playback

Resolution:
Installing 2.0.3 solved the problem, audio playback works as expected.

Possibly useful info:
I have a Yamaha USB-Midi Driver installed (v1.3.2)
I previously installed Soundflower, but have since uninstalled it

Running "sudo /Applications/MuseScore\ 2.app/Contents/MacOS/mscore -d" returns:
using PortAudio Version: PortAudio V19-devel (built May 2 2016 17:40:16)
in stat: : No such file or directory
in stat: : No such file or directory
in stat: : No such file or directory
in stat: : No such file or directory
Init midi driver failed

Let me know if I can help further.

same here!

Setup:
MacBook 2015
El Capitan 10.11.6
MuseScore 2.1.0
PortAudio API: Core Audio
Device: Built-in Output

Issue:
No playback, but metronome sound.
So perhaps it is not a sound issue, rather an AU issue?

Terminal output:
https://pastebin.com/6HZ0cawX

Workaround:
MuseScore 2.0.3 works fine!

Never touch a running system! 🙄

Same issue. Late model Mac with El Capitan. Using bluetooth speakers.

One curious thing is that my bluetooth speakers are listed twice under Preferences > I/O > PortAudio > Device.

Really looking for a solution here. :(

Could you check it with the last nightly from 2.2 too (in the same list dated from 2017-11-19)?

The master version is more for testing, not for daily use. But the nightly from MuseScore 2.2 should be quite stable.

After upgrading to High Sierra there was no sound. I have tried the latest nightly build version and in this version I have sound again.

latest nightly for master (highly experimental and not recommended for any serious work) or for 2.2 (pretty stable and fully compatible with other 2.1 releases)?

Is there a 2.2 for Mac availble? I have looked for it but couldn't find one. Or do you mean this one?
MuseScoreNightly-2017-11-26-2025-2.2-ce9ffd8.dmg

In reply to by Ziya Mete Demircan

I am so grateful that the MuseScore tool exists, and I definitely understand the nature of nightly builds and testing. Having said that the Mac sound problem is a P0 critical issue. I went from enjoying everyone's sheet music to getting zero value from this tool and being persistently disappointed.

If downloading and installing a nightly build fixes the issue I would argue it is not the right time to caution people about this being an experimental build. The official build works 0% and the nightly build works 100% so now may not be the best time to say "you're on your own if you do the nightlies."

Please recognize that people like me were desperate (maybe that's too strong a word) to get anything that worked. Let's just acknowledge some significant issue was fixed between the official release and the nightly builds and encourage people to use the nightlies until the fix is rolled upstream.

Unfortunately isn't not that simple. You might be able to listen to scores using the nightly build of master, but chances are they will look pretty bad, and it will crash not just a little but very often, and most importantly, any scores you create with this version will not be usable by anyone else using any past of future build. It's just not viable for anything but testing even if it happens to have a feature you value. The better workaround for those affected by this issue is to install 2.0.3.1 instead, which won't have the major limitations that the nightly builds of master do. Simply out: nightly builds are unsupported for a reason - they are not even close to being usable for real work, and attempting to do so is just shooting yourself in the foot.

Indeed, to be clear, I am only talking about "master" nightlies when emphasizing they are not suitable for real work. But as far as I know, 2.2 nightlies don't help with issue some subset of Mac users are seeing with sound. I'd love to find out I'm wrong about that...

Let's just acknowledge some significant issue was fixed between the official release and the nightly builds

Well this is the problem, nothing was fixed and we have no idea why the 2.2 nightly would fix the problem or even if it does fix the problem. So can someone confirm that he had no sound with 2.1 but sound with 2.2 nightly?

Title No sound on Mac, I/O's PortAudio API drop down menu empty Sound Issue
Status (old) active needs info
Status active needs info

I've been using MuseScore 2.1 Revision 871c8ce for a few months on my MacBook running El Capitan OS X 10.11.6 with sound working perfectly. It was still working today until it suddenly quit, though still worked for a short while when hitting a note, then that stopped working too. I can't keep going without the sound. Can someone please tell me how to find and install MuseScore 2.03? Many thanks!
mochsmochs

In reply to by mochsmochs

First try https://musescore.org/en/handbook/revert-factory-settings and https://musescore.org/en/node/96811 if it works for you.

2.0.3.1 (!) for Mac you'll find here: https://ftp.osuosl.org/pub/musescore/releases/MuseScore-2.0.3/

It would be also very helpful for future development if you could check (and report ;) the nightly versions of 2.2 and 3.0 (=master), if the sound works as expected with your Mac version: http://prereleases.musescore.org/macosx/nightly/

Title Sound Issue No sound on Mac, I/O's PortAudio API drop down menu empty
Status (old) needs info active
Status needs info active

Reinstating issue title and status...

In reply to by kuwitt

Dear kuwitt,
Many thanks for your speedy advice. Before going back to 2.0.3.1, I tried restoring the file from a backup made two weeks ago and lo and behold, the sound is back! I'm going to stay with the backup file and not try to figure out why this worked, even though I'll have to redo some changes made during the 2 weeks.

In reply to by lasconic

Same problem here, also blank dropdown, MS 2.1, macOS 10.13.3.
Had this issue a while ago, reset to defaults fixed it, may have been a different issue, didn't have blank dropdown that time.
This time the reset to defaults does not fix it.
I've read through this thread but I'm not clear as to what the situation is re a fix - and/or a workaround.
Any update please?
Thanks

I just tried the Feb 9 nightly and the problem is worse/different. The dropdown is still blank and in addition the play controls have disappeared.

I just tried the nightly rev 54ef6c0 and there is still no sound. There is metronome but no note sound. Is there anything I can do here to help troubleshoot this? I'd really, really like to get it fixed. Thanks.

Update:
The audio just stopped working again.
Revision: 782b2c9 nightly 2.2
macOS 10.13.3
Restarting MuseScore did not cure it.
Revert to Factory did not cure it.
So far I can't detect exactly when it fails or what causes it to stop working.
Always the metronome continues to work normally.
I'll happily troubleshoot if someone can tell me what I need to look for.
Thanks...

If the metronome works, then the link to the sound system is OK. It's the sound generation that doesn't work.
* Can you make sure that you have a soundfont loaded in View > Synthesizer?
* When playing do you see the vue meter moving in the synthesizer ?
* Can you paste the result of running /Applications/MuseScore\ 2.app/Contents/MacOS/mscore -d in the terminal on pastebin.com ?

  1. Yes, I have FluidR3Mono_GM.sf3 listed in the "Fluid" tab.
  2. No action in the VU meter when playing a score.
  3. When I run that command I get nothing - it just returns me to the prompt - what's supposed to happen?
    Thanks

In reply to by polarbreeze

I went into the package through the GUI and what i got back in terminal is copied below. Did it save a log somewhere or something?

Last login: Thu Feb 15 06:28:12 on ttys000
/Applications/MuseScore\ 2.app/Contents/MacOS/mscore ; exit;
MacBook:~ Tweddle$ /Applications/MuseScore\ 2.app/Contents/MacOS/mscore ; exit;
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...20 completed.

[Process completed]

Surprisingly the sound just came back - no doubt temporarily.
When I noticed that I decided to try running the nightly at the same time, just to see what happened.
Result:

The audio continues to run normally in the released version; there is no audio in the nightly. Maybe that's a clue?
- same score file in both cases
- metronome normal in both cases

I've been playing around with the two versions of MS running simultaneously, then starting and stopping each one. The result, unfortunately, is confusing but the general theme is that in either case sometimes the audio works and sometimes it doesn't. Talking a bit unscientifically, it's as though the soundfont is sometimes "busy" and not accepting inputs - and the times at which it's busy seems to occur at unpredictable times with no obvious cause.

  1. This morning at home I reached a point where MS was behaving normally with full audio. Able to open/close/open the app, open/close open individual files etc.
  2. I closed my MacBook, went to work; and now at work: no audio.
  3. Revert to factory does NOT fix it, tried several times.
  4. Before I came here I had already suspected "sleep" as a possible cause so I did some experimenting with that already - I concluded that simply a short sleep does NOT seem to cause the issue.
  5. Each time I always check for metronome sound. Metronome is always present.
Title No sound on Mac, I/O's PortAudio API drop down menu empty 2.03 works?! No sound on Mac, I/O's PortAudio API drop down menu empty

Based on comments in another thread, I installed an older version, 2.0.3. The audio does work OK with this version so it's back to 2.0.3 for me. However, the fault is in its nature intermittent so I'll keep monitoring it.

Title 2.03 works?! No sound on Mac, I/O's PortAudio API drop down menu empty No sound on Mac, I/O's PortAudio API drop down menu empty

Yes this is a regression, and we know that since quite long.

The issue is still present in the latest nightly build. If anyone wants me to run some tests or something, post logs whatever, please let me know. It's intermittent so if you tell me what to look for I can maybe "catch it in the act"? Despite trying hard I have found no way to trigger the fault at will.

I've got 2.1 and 2.0.3 running the same score here in the same environment. I get audio with 2.03; no audio with 2.1. When I look at the logs I see one difference: there's an error message in the 2.1 log that is not present in the 2.0.3 log:

error 13:55:26.732336 -0500 coreaudiod HALS_IOA1Engine.cpp:365:EndWriting: HALS_IOA1Engine::EndWriting: got an error from the kernel trap, Error: 0xE00002EE

I don't know if this means anything important - I must admit I don't totally know what I'm doing here - but the logs are attached in case it helps.

Without having experiences with Mac, but if I enter the error code "Error: 0xE00002EE" from your log file in a search engine, could it be a driver problem of Apple?

OK, I reached the point where MS 2.1 was "permanently" without audio - numerous restarts, restore to default, etc etc, nothing would make it speak. Then I wiped everything MS-2.1-related from my computer and I created a fresh, clean "test user". I re-downloaded MS 2.1 and I have it running right now as Test User - the audio is running fine. Anyone have any thoughts about what I should do next towards tracking this fault down? (By the way, while MuseScore is running that coreaudio error message is still appearing on the console every few seconds, with no score running.)

During all of this:
(a) MS 2.0.3 is still installed and runs normally on demand with full audio.
(b) Metronome sound always works fine.

Title No sound on Mac, I/O's PortAudio API drop down menu empty PRAM reset restored audio on v2.1 No sound on Mac, I/O's PortAudio API drop down menu empty

I'd pretty much given up on ever getting audio from v2.1, having tried everything I could possibly think of. Then I tried a PRAM reset and voila, audio returned. So that's a pretty good clue about what might be going wrong with the audio there - take a look in the PRAM settings. We'll see how long it stays fixed.

Title PRAM reset restored audio on v2.1 No sound on Mac, I/O's PortAudio API drop down menu empty No sound on Mac, I/O's PortAudio API drop down menu empty

This may or may not be connected but I just noticed that the output device doesn't always correspond to what the dropdown shows. For example, I just had my MacBook connected to a Uno USB audio interface. Both the Uno and the built-in devices are listed in the output dropdown (Uno appears twice or some reason). I select the Uno, the audio obligingly goes through the Uno. BUT when I re-select the built-in device (and "OK" of course) the audio continues to go through the Uno. Going back into the I/O preferences I confirmed that according to the dropdown it has built-in device selected.

In reply to by polarbreeze

Title No sound on Mac, I/O's PortAudio API drop down menu empty USB audio is OK. No sound on Mac, I/O's PortAudio API drop down menu empty

Two things I just discovered:

  1. USB audio is not affected by this no-audio bug. If I have a USB audio output device connected I can always get sound, even when there is no sound from the built-in. I've switched back and forth multiple times between built-in and USB - confirmed this is dependably the case. No audio on built-in; audio OK on USB.

  2. MuseScore seems to bypass the Mac's built-in audio output device selection. This means that the user cannot redirect the audio output to a different device using the Mac's own controls - that selection is superseded by MS's settings. I'm not sure that's a good practice - and it could even have something to do with this issue.

Some might say that MS should not have an audio output device selector at all - leave it to the Mac to handle that, using the control handily available in the Mac's menu bar.

Anyhow, it seems to me that if the USB audio works, that means the synthesizer and the sound fonts and all that are working - so it must be an issue in the final audio path.

Just did an NVRAM reset (on mid-2015 MBP, El Capitan 10.11.6)

N.B. Single bluetooth headset device appears twice in the portAudio device list.
Referred to as BT(1) and BT(2) below.

Nightly 3.0.0-ad89d0c
PortAudio V19-devel (built May 2 2016 17:40:16)
WARNING: 140: This application, or a library it uses, is using the deprecated
Carbon Component Manager for hosting Audio Units. Support for this will be removed
in a future release. Also, this makes the host incompatible with version 3 audio units.
Please transition to the API's in AudioComponent.h.
in stat: : No such file or directory
in stat: : No such file or directory
Init midi driver failed

STD-OUT: Playback (and metronome)
BT(1) No playback (but metronome *is* audible on STD OUTPUT !!!) 
BT(2) No playback (but metronome *is* audible on BT) 

Nightly 2.2.0-9799b90
PortAudio Version: PortAudio V19-devel (built May 2 2016 17:40:16)
same errors as above

STD-OUT: Playback (and metronome)
BT(1) No playback (but metronome *is* audible on STD OUTPUT !!!) 
BT(2) No playback (but metronome *is* audible on BT) 

2.1.0-871c8ce
PortAudio Version: PortAudio V19-devel (built May 2 2016 17:40:16)
same errors as above

STD-OUT: Playback (and metronome ) 
BT(1) No playback (but metronome *is* audible on STD OUTPUT !!!) 
BT(2) No playback (but metronome *is* audible on BT) 

2.0.3.1-6347ed6
using PortAudio Version: PortAudio V19-devel (built Dec 21 2014 18:55:58)
same errors as above

STD_OUT: Playback (and metronome ) 
BT(1): Playback (and metronome but BOTH are on STD-OUT) 
BT(2): Playback (and metronome) 
 -BUT previously this worked properly whichever BT entry was selected
Title USB audio is OK. No sound on Mac, I/O's PortAudio API drop down menu empty No sound on Mac, I/O's PortAudio API drop down menu empty

New symptom: I now have built-in audio in 2.1; however, all of the selector boxes are blank.

Screen Shot 2018-02-18 at 08.08.21.jpg

Oh, first time I'd seen that - I must have come in the middle of the movie!
By the way, a reliable way to make the built-in audio fail seems to be to engage in some Bluetooth activity (not necessarily inside MS).

One of the things that strikes me most is that MuseScore 2.1 - 2.2Nightly and 2.0.3.1 use portaudio libraries compiled at two different times, and most probably based on two different commits. It could be a regression of portaudio.
To test this, I took one of the most recent 2.2 Nightlies ( 51685cc ) and repacked it replacing portaudio library with the pone taken from 2.0.3.1; here it is:
https://drive.google.com/open?id=15QqAaJgMkob-Tz-mTgUG_5n3GXllCtje
Could someone experiencing the bug please test this build and report back how it behaves?
Thank you for your help; unfortunately, I cannot reproduce the bug.

In reply to by ABL

An excellent idea ABL. I just tried your build and the results is: it does still have the audio fault. To double check I cold rebooted the computer etc and also I ran the same score file alternately with this build and with 2.0.3 - in the same environment, back and forth. 2.0.3 continues to work fine; this build has no audio. In both cases, the metronome sound does work.

  1. Different output paths behave in different ways, see table.
    Screen Shot 2018-02-23 at 19.22.22.jpg
  2. Some devices have multiple entries, guessing because they have both an input port and and output port; however, this difference isn't identified in the dropdown.
    Screen Shot 2018-02-23 at 19.17.15.jpg
  3. Is the issue simply that the dropdown device selects is confused? (Yes, I am remembering to restart MS each time I select a different output device).
  4. Wouldn't it be better to let the OS handle the output device switching, instead of this dropdown - especially if the dropdown is malfunctioning?
Status (old) active patch (code needs review)
Status active  
Reported version 2.1 3.0

Changed version to 3.0 cause created PR for it. But fix is viable for 2.2, too.

I'm wondering... if this is actually consistent with the symptoms I am seeing on my MacBook 12":
1. The dropdown are not blank - they are properly populated
2. When "built-in" audio is selected:
a) With both 2.0.3 and 2.1: this console coreaudio error message is repeated every few seconds, even if no score is playing:
"HALS_IOA1Engine.cpp:365:EndWriting: HALS_IOA1Engine::EndWriting: got an error from the kernel trap, Error: 0xE00002EE"
b) With 2.1, there is no audio from the score or from note entry; however, the metronome can be heard normally.
c) With 2.0.3, the audio works properly.
3. When "Bluetooth, "HDMI" or "USB" audio is selected:
a) There is no error message of that sort either with 2.0.3 or with 2.1
b) The audio works properly with both 2.0.3 and 2.1

Hmm.

The I/O devices output list often contains a couple of entries for the same device (e.g. B/T headset). I can't categorise the behaviour when selecting one or the other (I've had both entries working to the relevant output device but I've also had one of them failing to make any output at all). They seem to be entries in the PortAudio device list for which the device an have input and/or output channels (I've seen one B/T headset entry with "#inputs > 0 && #outputs == 0" and a second entry the other way around). I think the UI ought only offer as possible output devices those entries which have "#outputs > 0".

Additionally, it appears that the preference PREF_IO_PORTAUDIO_DEVICE is an integer index. My expectation is that devices come and go independently and that the index for a given device will vary. Airplay devices (which I occasionally want to use) come and go for sure. Unplugging or losing contact with a B/T device will probably result in a re-allocation of devices indices within Port Audio leading to output being directed to somewhere unintended. Did anyone try making PREF_IO_PORTAUDIO_DEVICE a string (the device name, which would stay the same, independent of any (re-)enumeration.)? That would make more sense to me.

Indeed, it should only list output devices in that dialog. Also, at least on Windows, the names of those devices are truncated, so you don't even see the full name.

I've played around with this a lot and I can confirm that the output device list does offer up both input devices and output devices. Since these often have the same name, it then appears that the list contains duplicate entries. If the user selects an input devices (unknowingly), the result, of course, is silence. This would be one of the causes of the "no audio" reports (though not the main one).

12" MacBook early 2015 running macOS 10.13.3
Musescore 2.1.0

I have been struggling with this issue too. Today I accidentally discovered that audio playback works correctly if I have either my wired headphones (Apple EarPods) or my wireless headphones (Apple AirPods) connected AND I drag an .xml file onto Musescore to open it. I then can use my headphones or disconnect them and audio plays normally with the internal speakers. I can open or close any files I want and audio continues to work fine as long as I keep Musescore open. If I start Musescore and then open the same .xml file there is no audio.

Musescore 2.0.3 has no audio for me either

So now it looks like it doesn’t always work with wireless headphones, but it seems to work every time with wired headphones... And once audio works with any one speaker I can switch between any speakers and it keeps working. It even stays working if my Mac goes to sleep as long as I don’t close MuseScore. So it looks like I’ll just leave MuseScore open in the background most of the time so my audio works 👍🏻

Just wanted to mention that the symptom "drop down menu empty" is not necessarily present when the audio is not working. So perhaps there are two different issues in play here?

Uh-oh!!! Sorry to report that all is NOT well with 2.2-3413e07. The original no-audio issue has been fixed OK. However, now MuseScore hijacks the Bluetooth audio so that no other applications can play through Bluetooth.

Even if I switch MuseScore back to built-in (and restart it), such that the MuseScore audio plays through the built-in speakers, no other apps on my computer seem to have access to the Bluetooth speaker. Even if I close MuseScore, the other apps are not playing through Bluetooth.

Example: I play a song in iTunes, making sure the Bluetooth speaker is showing connected in the menu bar volume control. However, the iTunes music nevertheless plays through the built-in speaker.

This fault appeared the first time I ran this new build of MuseScore. I suppose it's possible it's a coincidence - but highly unlikely - never had an issue like that before.

In reply to by polarbreeze

I've checked with actual 2.2. First, I used bluetooth speaker for youtube and muse score sound simultaneously. Then, my bluetooth speaker sounds with youtube and MuseScore does with internal speakers. Sound is here in both cases.

I even didn't touch devices definitions :)

BTW, I agree with Jo-jo. This page becomes too hard to keep everything in mind.

In reply to by Jojo-Schmitz

OK, I will - I’ll keep checking - it’s not always the same. I think one issue is that MuseScore tries to do its own output device selection instead of letting macOS do it - and then maybe they disagree…? Each time I have silence it seems to be associated with a change of output devices. Anyway, different issue, yes.