Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MuseScore development builds crash when placing note #16852

Open
faskr opened this issue Mar 16, 2023 · 12 comments
Open

MuseScore development builds crash when placing note #16852

faskr opened this issue Mar 16, 2023 · 12 comments
Assignees
Labels
crash Issues involving a crash of MuseScore muse sounds

Comments

@faskr
Copy link
Contributor

faskr commented Mar 16, 2023

I have been working on a cloned repo of MuseScore on Ubuntu 22.04, but recently I started having a problem that I didn't have before. Any build that I run crashes when a new note is placed on a score. I even tried re-cloning but the same thing happened. There seems to be something wrong with my system but all required packages that I could find are installed. I don't think it has to do with MuseScore updates either, because complete builds that worked before started crashing too. Here's the output:
17:01:48.022 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: note-input 17:01:48.192 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: put-note Fatal (internal) error in ../celt/celt_decoder.c, line 118: assertion failed: st->mode == opus_custom_mode_create(48000, 960, NULL) [38186:38186:20230315,170148.238939:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.241164:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.244452:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.244530:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.244687:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.244764:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.244855:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248149:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248286:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248477:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248518:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248557:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248597:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248635:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248673:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248709:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248745:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248794:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248855:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248903:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.248959:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249012:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249060:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249114:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249166:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249224:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249276:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249348:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249408:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249472:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249557:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249620:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.249686:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.250034:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.250104:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.250254:ERROR elf_dynamic_array_reader.h:61] tag not found [38186:38186:20230315,170148.250308:ERROR elf_dynamic_array_reader.h:61] tag not found CMake Error at build.cmake:293 (message): Run step failed with status Subprocess aborted. See output above for details.

I don't think this is reproducible from what I know currently, but my system is Ubuntu 22.04, and I simply opened a new score, entered note placing mode, and placed a note. I tested the latest development push, but as I said, builds from prior pushes that had worked suddenly had the same problem even though I hadn't rebuilt them.

@Jojo-Schmitz
Copy link
Contributor

@Jojo-Schmitz
Copy link
Contributor

Maybe don't build in Debug mode?

@lyrra
Copy link
Contributor

lyrra commented Mar 16, 2023

Can't reproduce it. Though it's strange how a note-input can cause a crash in opus. Since opus is used during export to ogg.

@cbjeukendrup cbjeukendrup added the crash Issues involving a crash of MuseScore label Mar 16, 2023
@faskr
Copy link
Contributor Author

faskr commented Mar 16, 2023

Maybe don't build in Debug mode?

It crashes in both Debug and Release.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Mar 16, 2023

Strange, asserts should be disabled in non-Debug builds

@faskr
Copy link
Contributor Author

faskr commented Mar 16, 2023

I found out that besides the above case, it crashes when opening any score with notes that is produced by MuseScore 4, but there's no problem with scores from MuseScore 3.

@faskr
Copy link
Contributor Author

faskr commented Mar 19, 2023

I got the MuseScore build to run fine on a VM without this problem but on my host system for whatever reason it's still happening.

@cbjeukendrup
Copy link
Contributor

@faskr Given that you can build MuseScore yourself, does that also mean you can run it in a debugger? It would be useful to see the stack trace (rather than the console output).

@faskr
Copy link
Contributor Author

faskr commented Mar 20, 2023

@faskr Given that you can build MuseScore yourself, does that also mean you can run it in a debugger? It would be useful to see the stack trace (rather than the console output).

This is the call stack when MS4 pauses on exception as soon as a note is placed:

libc.so.6!__pthread_kill_implementation(int no_tid, int signo, pthread_t threadid) (pthread_kill.c:44)
libc.so.6!__pthread_kill_internal(int signo, pthread_t threadid) (pthread_kill.c:78)
libc.so.6!__GI___pthread_kill(pthread_t threadid, int signo) (pthread_kill.c:89)
libc.so.6!__GI_raise(int sig) (raise.c:26)
libc.so.6!__GI_abort() (abort.c:79)
libopus.so.0![Unknown/Just-In-Time compiled code] (Unknown Source:0)
libopus.so.0!opus_multistream_decode_float (Unknown Source:0)
libMuseSamplerCoreLib.so!op_decode(OggOpusFile * _of, op_sample * _pcm, const ogg_packet * _op, int _nsamples, int _nchannels) (/home/mtesch/StaffPad/Core/ThirdParty/Opus/build-src/ios/opusfile-0.9/src/opusfile.c:2786)
libMuseSamplerCoreLib.so!op_read_native(OggOpusFile * _of, op_sample * _pcm, int _buf_size, int * _li) (/home/mtesch/StaffPad/Core/ThirdParty/Opus/build-src/ios/opusfile-0.9/src/opusfile.c:2874)
libMuseSamplerCoreLib.so!staffpad::files::OggOpusDecoder::read(staffpad::audio::Signal32&) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::SfzVoice::cachingRead(int, staffpad::audio::Signal32&) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::SfzVoice::crossfadeRead(int, staffpad::audio::Signal32&) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::SfzVoice::loopedRead(staffpad::audio::Signal32&) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::SfzVoice::dequeueAudio(int) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::SfzVoice::generate(int) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::BaseInstrument::KeyData::generate(int, int) const (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::BaseInstrument::processKeyEvents(staffpad::vi::BaseInstrument::KeyData&, staffpad::vi::VIEventList const&, staffpad::audio::Signal32&, bool) (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::vi::BaseInstrument::process(double, staffpad::vi::VIEventList const&, staffpad::audio::Signal32&) (Unknown Source:0)
libMuseSamplerCoreLib.so!std::enable_if<is_invocable_r_v<staffpad::audio::Signal32, std::_Bind<staffpad::vi::PlaybackEngine::generate(double, staffpad::audio::Signal32&, std::optional, staffpad::vi::PrerenderBuffer const*)::$_0 ()>&>, staffpad::audio::Signal32>::type std::__invoke_r<staffpad::audio::Signal32, std::_Bind<staffpad::vi::PlaybackEngine::generate(double, staffpad::audio::Signal32&, std::optional, staffpad::vi::PrerenderBuffer const*)::$_0 ()>&>(std::_Bind<staffpad::vi::PlaybackEngine::generate(double, staffpad::audio::Signal32&, std::optional, staffpad::vi::PrerenderBuffer const*)::$_0 ()>&) (Unknown Source:0)
libMuseSamplerCoreLib.so!std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Resultstaffpad::audio::Signal32, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::_Bind<staffpad::vi::PlaybackEngine::generate(double, staffpad::audio::Signal32&, std::optional, staffpad::vi::PrerenderBuffer const*)::$_0 ()>, std::allocator, staffpad::audio::Signal32 ()>::_M_run()::{lambda()#1}, staffpad::audio::Signal32> >::_M_invoke(std::_Any_data const&) (Unknown Source:0)
libMuseSamplerCoreLib.so!std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) (Unknown Source:0)
libc.so.6!__pthread_once_slow(pthread_once_t * once_control, void ()(void) init_routine) (pthread_once.c:116)
libMuseSamplerCoreLib.so!std::__future_base::_Task_state<std::_Bind<staffpad::vi::PlaybackEngine::generate(double, staffpad::audio::Signal32&, std::optional, staffpad::vi::PrerenderBuffer const
)::$_0 ()>, std::allocator, staffpad::audio::Signal32 ()>::_M_run() (Unknown Source:0)
libMuseSamplerCoreLib.so!staffpad::ThreadPool::workerThreadFunction() (Unknown Source:0)
libstdc++.so.6![Unknown/Just-In-Time compiled code] (Unknown Source:0)
libc.so.6!start_thread(void * arg) (pthread_create.c:442)
libc.so.6!clone3() (clone3.S:81)

@cbjeukendrup
Copy link
Contributor

Thanks! That's useful. So this is a Muse Sounds issue...

@Blargian
Copy link
Contributor

Blargian commented Jun 12, 2023

I'd like to add to this that I seem to be running into the same issue while trying to select a new sound from the mixer while running Debug (from master branch) on Ubuntu 22.04.2. The only other instruments pack I have besides MuseBasic is MuseBrass. When selecting a MuseBrass instrument the program crashes with a segfault. This bug is not reproducible for me in the 4.0.2 release.

Application output:

Fatal (internal) error in ../celt/celt_decoder.c, line 118: assertion failed: st->mode == opus_custom_mode_create(48000, 960, NULL)

stack trace:

1 __pthread_kill_implementation pthread_kill.c 44 0x7ffff2896a7c
2 __pthread_kill_internal pthread_kill.c 78 0x7ffff2896a7c
3 __GI___pthread_kill pthread_kill.c 89 0x7ffff2896a7c
4 __GI_raise raise.c 26 0x7ffff2842476
5 __GI_abort abort.c 79 0x7ffff28287f3
6 ?? 0x7ffff78fecd5
7 ?? 0x7ffff7907ac9
8 ?? 0x7ffff7907c07
9 ?? 0x7ffff792ef43
10 ?? 0x7ffff79304ae
11 ?? 0x7ffff7939f12
12 opus_multistream_decode_float 0x7ffff793a19d
13 op_decode opusfile.c 2786 0x7fffcc4de98f
14 op_read_native opusfile.c 2874 0x7fffcc4dffa4
15 staffpad::files::OggOpusDecoder::read(staffpad::audio::Signal32&) 0x7fffcc31b409
16 staffpad::vi::SfzVoice::cachingRead(int, staffpad::audio::Signal32&) 0x7fffcc35f03b
17 staffpad::vi::SfzVoice::crossfadeRead(int, staffpad::audio::Signal32&) 0x7fffcc35f34e
18 staffpad::vi::SfzVoice::loopedRead(staffpad::audio::Signal32&) 0x7fffcc35fc4a
19 staffpad::vi::SfzVoice::dequeueAudio(int) 0x7fffcc362819
20 staffpad::vi::SfzVoice::generate(int) 0x7fffcc361f7d
...

@diedeno
Copy link

diedeno commented Jun 21, 2023

I have exactly the same on my 4.1 build on Ubuntu 22.04 (vst enabled), when selecting a MuseSounds instrument in the mixer.
(VST gui works in some cases with Linux VST's, in all cases with Windows VST's + yabridge, e.g. BBCSO, Miroslav, Kontakt)
Fatal (internal) error in ../celt/celt_decoder.c, line 118: assertion failed: st->mode == opus_custom_mode_create(48000, 960, NULL)
[34205:34205:20230621,081608.982559:ERROR elf_dynamic_array_reader.h:61] tag not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Issues involving a crash of MuseScore muse sounds
Projects
None yet
Development

No branches or pull requests

8 participants