MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

[MU4 Issue] Mac "open -a ...mscore filename.ext" ignores file

Open mscuthbert opened this issue 2 years ago • 5 comments

Describe the bug In previous versions of MuseScore, Mac users could open MuseScore and show a particular file with:

open -a "/Applications/MuseScore 3.app" filename.musicxml (or .mscz, etc.)

In MuseScore 4, if MuseScore is not already opened, then the file is ignored and only the New & recent files browser shows up. (Same if /Contents/MacOS/mscore is appended)

The command "/Applications/MuseScore 4.app/Contents/MacOS/mscore" filename.musicxml with the full path to mscore without the open -a works, but this takes control of the terminal, prints debug information, crashes the program upon Ctrl-C, etc.

If MuseScore 4 is already open, the open command works as expected.

To Reproduce Steps to reproduce the behavior:

  1. Create a mscz file called t1.mscz on Desktop
  2. Be sure to close MuseScore 4 completely
  3. Open terminal
  4. Run cd ~/Desktop
  5. Run open -a "/Applications/MuseScore 4.app" t1.mscz
  6. See New & Recent screen rather than the score. (the bug)
  7. Without closing MuseScore 4, go to Terminal
  8. Run open -a "/Applications/MuseScore 4.app" t1.mscz again
  9. t1.mscz is properly shown in MuseScore 4

Expected behavior The effect of step 9 (seeing the score) should have already happened at step 6

Platform information

  • macOS 12.6
  • MuseScore 4.0.0.223472200 without MuseHub

Additional context Noticed while checking music21 for MuseScore 4 compatibility. Without this function, score.show() will not work with MuseScore 4 configured as the default MusicXML reader.

mscuthbert avatar Dec 21 '22 03:12 mscuthbert

@mscuthbert I can't reproduce your issue. The score opens up for me right away at step 6

( Also, the open command only finds the program if I add '\' in front of ' 4' like this open -a /Applications/MuseScore\ 4.app 1.mscz )

Eism avatar Dec 21 '22 09:12 Eism

Related to #15292, which also doesn't happen for everyone / with every build

cbjeukendrup avatar Dec 21 '22 11:12 cbjeukendrup

I can reproduce with @mscuthbert's instructions on every attempt.

jacobtylerwalls avatar Dec 22 '22 23:12 jacobtylerwalls

Sorry my cut and paste removed the backslashed space when posting here. I've updated with quotes around the full path.

mscuthbert avatar Dec 23 '22 00:12 mscuthbert

@cbjeukendrup seems totally right -- it's probably a dup of #15292 since I have the same problem with simply clicking the icon of an "mcsz" score.

mscuthbert avatar Dec 23 '22 00:12 mscuthbert

fixed in https://github.com/musescore/MuseScore/pull/15815

@mscuthbert please reopen the issue if you still can reproduce the bug

RomanPudashkin avatar Jan 11 '23 11:01 RomanPudashkin

Multas Gratias!

mscuthbert avatar Jan 12 '23 08:01 mscuthbert