[ Follow-up 3 ] More Spring 2023 fixes

MusE is a DAW for Linux with both MIDI and Audio editing. https://muse-sequencer.github.io

Moderators: MattKingUSA, khz, spamatica

Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

[ Follow-up 3 ] More Spring 2023 fixes

Post by Tim E. Real »

Hi all. Some more important crash and bad behaviour fixes in github master now.
For all its strengths and weaknesses, if we can't trust it not to crash as it is, users will move on.

  • * Fixed: More crashes / bad behaviour during song (re)loading. Further to 08.05.2023.
    Eliminated QPointer<MasterEdit> in class MusE. Bug was pre-existing (not me).
    The pointer was failing to nullify itself soon enough, causing crashes and/or errors like:
    "QMdiArea::setActiveSubWindow: window is not inside workspace" and "unknown tag <...> at line xxxx".

  • * Fixed: Rewrote several functions in class MusE for more safety. readToplevels() and accompanying
    findOpenEditor(), startDrumEditor(), startMasterEditor(), startWaveEditor(), startPianoroll().
    It was too easy for readToplevels() to mess up badly if it failed starting an editor.

This next one may be more important than any other fixes. For all audio fans. Myself and @spamatica included.
Imagine being in the middle of recording a stellar performance and somewhere between the middle and end the app crashes :(
This one was highly intermittent and very difficult to track down. Please let me know if such crashes are still seen.

  • * Fixed: Some, possibly all, ancient intermittent crashes when recording or playing wave tracks.
    Our SndFile class used a reference counting system but it was non-atomic and not thread-safe.
    Code disassembly revealed timing holes where other threads could wreak havoc.
    Replaced with atomic reference counter and atomic pointer to SndFile.
    Carefully rearranged and rewrote the reference counting system. Testing stable so far...

This next one contains a radical change. The disk thread is no longer real-time. Hence it is more 'relaxed'.
Please let me know if any disk buffer under-run or similar errors are seen.

  • * Fixed: Transport completely unresponsive upon song load, intermittent. (My fault long ago).
    Do not call audioPrefetch->msgSeek() in seqStart() since it's already initiated by audio start.
    It was a non-no: Two different threads - gui and audio - had put seek messages into the prefetch
    message pipe. The result was chaos with 'seekCount' on the prefetch end of the pipe.
    Reset prefetch 'seekCount' to zero in AudioPrefetch::start(). In case 'seekCount' ever messes up
    again, this allows simply reloading a song, or menu > 'Restart Audio', to fix the problem.
    Disk prefetch thread is NO LONGER REALTIME! It is now a default NORMAL thread. (My fault long ago).
    Rewrote MusE::seqStart() so prefetch is started before audio. Also, wait until prefetch is running!
    TESTED OK playing and recording complex songs. The prefetch cache maintained a high fill level.
    TODO: Now that disk prefetch thread is no longer realtime, replace its pthreads with QThread,
    for easier cross-compatibility!
    TO FIX: A small bug where the transport sometimes fails to return to the saved place on song load.

  • * Fixed: Subtle error: Editors wouldn't open multiple parts sometimes.
    Failed if another editor contained the same number of parts AND at least one of the same parts.
    It was a pre-existing bug in MusE::findOpenEditor() (not me).

User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

Just rebuilt it, but still getting my crash test dummy crash.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Tim E. Real »

Crash observed!
Hm.... Well that was too easy. Innocent looking file.
Checking, thanks...

User avatar
Impostor
Established Member
Posts: 1332
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 138 times
Been thanked: 344 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Impostor »

Tim E. Real wrote: Fri May 26, 2023 6:22 am

Crash observed!
Hm.... Well that was too easy. Innocent looking file.
Checking, thanks...

If you save a project with the piano roll open and project notes to be displayed at loading, then reloading this project from this same project crashes MusE.

Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Tim E. Real »

It's worse here. It crashes as soon as I simply instantiate fluidsynth-dssi!
So, nothing to do with your file.

Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Tim E. Real »

Whoa! A few things with this one:

1) You are most likely using a distro-packaged fluidsynth-dssi? Some unofficial unreleased build like 1.9.9-git, like mine says?
Get rid of that piece of shit! It crashes QTractor here as well.
Build from latest github or SF. That ran OK here.

2) Well, whaddya know... MusE still crashed. It was not calling DSSI's run_multiple_synths() correctly.
A fix has just been pushed. Tested OK here.

3) Well, whaddya know. There is still yet another song reloading crash (unrelated to any plugin or this report).
I was worried that was still there. I'll have to squash that one...
When reloading songs it might still crash.
It has to do with our heartbeat timer calling non-existent mixer strip tracks. A dump will show this.
To be fixed...

User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

Tim E. Real wrote: Fri May 26, 2023 4:47 pm

Whoa! A few things with this one:

1) You are most likely using a distro-packaged fluidsynth-dssi? Some unofficial unreleased build like 1.9.9-git, like mine says?
Get rid of that piece of shit! It crashes QTractor here as well.
Build from latest github or SF. That ran OK here.

Devuan Chimaera (mostly Debian stable), fluidsynth-dssi 1.0.0-8 (the distro version).

Only one instrument still using fluidsynth-dssi, I switched to Calf Fluidsynth LV2 for the others. I'll switch the last remaining one later today.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

Tim E. Real
Established Member
Posts: 660
Joined: Sat Sep 15, 2012 12:36 am
Has thanked: 36 times
Been thanked: 105 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Tim E. Real »

Yeah it is kind of super out-dated.
But... we try to at least support old archived songs when you dig them out to have a listen, with minimal hassle :wink:

Found the cause of 3).
Wow! Tough one. Working on solutions...

User avatar
Impostor
Established Member
Posts: 1332
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 138 times
Been thanked: 344 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Impostor »

onefang wrote: Sat May 27, 2023 12:43 am

Only one instrument still using fluidsynth-dssi, I switched to Calf Fluidsynth LV2 for the others. I'll switch the last remaining one later today.

Any reason why you're not using MusE's own soundfont player?

User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

Impostor wrote: Sat May 27, 2023 3:44 pm
onefang wrote: Sat May 27, 2023 12:43 am

Only one instrument still using fluidsynth-dssi, I switched to Calf Fluidsynth LV2 for the others. I'll switch the last remaining one later today.

Any reason why you're not using MusE's own soundfont player?

Coz I didn't know it has one. Not seeing anything obvious in the "Select Software Synthesizer" dialog.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

User avatar
Impostor
Established Member
Posts: 1332
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 138 times
Been thanked: 344 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Impostor »

onefang wrote: Sat May 27, 2023 3:50 pm
Impostor wrote: Sat May 27, 2023 3:44 pm
onefang wrote: Sat May 27, 2023 12:43 am

Only one instrument still using fluidsynth-dssi, I switched to Calf Fluidsynth LV2 for the others. I'll switch the last remaining one later today.

Any reason why you're not using MusE's own soundfont player?

Coz I didn't know it has one. Not seeing anything obvious in the "Select Software Synthesizer" dialog.

You don't have a MESS type synth "fluidsynth"? It's built-in by default here. Maybe you don't have libfluidsynth-dev/libinstpatch-dev installed? It may be skipped by default then..

Attachments
Screenshot from 2023-05-27 18-12-32.png
Screenshot from 2023-05-27 18-12-32.png (47.53 KiB) Viewed 1692 times
User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

Impostor wrote: Sat May 27, 2023 4:10 pm
onefang wrote: Sat May 27, 2023 3:50 pm
Impostor wrote: Sat May 27, 2023 3:44 pm

Any reason why you're not using MusE's own soundfont player?

Coz I didn't know it has one. Not seeing anything obvious in the "Select Software Synthesizer" dialog.

You don't have a MESS type synth "fluidsynth"? It's built-in by default here. Maybe you don't have libfluidsynth-dev installed? It may be skipped by default then..

Ah I did look at that. I can't see a way to select the actual instrument within the soundfont, only the soundfont.

So MESS type plugins are the MusE specific plugins?

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

All the other fluidsynth players (including Qsynth) allow you to select which bank and which program within that bank play for each channel. Not seeing that in the MESS one. The Fluidsynth DSSI one just lets you choose the bank / program for that synth track.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

User avatar
Impostor
Established Member
Posts: 1332
Joined: Wed Aug 17, 2022 1:55 pm
Has thanked: 138 times
Been thanked: 344 times

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by Impostor »

onefang wrote: Sat May 27, 2023 4:18 pm
Impostor wrote: Sat May 27, 2023 4:10 pm
onefang wrote: Sat May 27, 2023 3:50 pm

Coz I didn't know it has one. Not seeing anything obvious in the "Select Software Synthesizer" dialog.

You don't have a MESS type synth "fluidsynth"? It's built-in by default here. Maybe you don't have libfluidsynth-dev installed? It may be skipped by default then..

Ah I did look at that. I can't see a way to select the actual instrument within the soundfont, only the soundfont.

So MESS type plugins are the MusE specific plugins?

You assign each soundfont to a midi channel* on the right (in my screenshot). You can then select instruments in the mixer strips of the midi tracks you assign to fluidsynth.

EDIT: I should've said, to every midi channel you can assign a soundfont.

Mess is MusE-specific, yes.

Attachments
patcj=g.png
patcj=g.png (72.29 KiB) Viewed 1681 times
Last edited by Impostor on Sat May 27, 2023 6:10 pm, edited 1 time in total.
User avatar
onefang
Established Member
Posts: 148
Joined: Fri Feb 03, 2023 1:17 am
Location: Australia
Has thanked: 67 times
Been thanked: 11 times
Contact:

Re: [ Follow-up 3 ] More Spring 2023 fixes

Post by onefang »

Impostor wrote: Sat May 27, 2023 4:28 pm
onefang wrote: Sat May 27, 2023 4:18 pm
Impostor wrote: Sat May 27, 2023 4:10 pm

You don't have a MESS type synth "fluidsynth"? It's built-in by default here. Maybe you don't have libfluidsynth-dev installed? It may be skipped by default then..

Ah I did look at that. I can't see a way to select the actual instrument within the soundfont, only the soundfont.

So MESS type plugins are the MusE specific plugins?

You assign each soundfont to a midi channel on the right (in my screenshot). You can then select instruments in the mixer strips of the midi tracks you assign to fluidsynth.

Mess is MusE-specific, yes.

Ah thanks for that. I'll try that later today.

I prefer to be known as a figment of the 'nets imagination, living in the future, waiting for the rest of you to catch up.
Notes from Untalenz, an untalented old muso https://Untalenz.rocks/

Post Reply