Crashed with "malloc(): invalid next size (normal)" while editing score, cannot re-open.

• Aug 12, 2023 - 00:21

I'm running Musescore 4.1.1 on Debian Linux with 32GB RAM.

I've been working on the attached score, which has an orchestral layout and a piano grand staff I pasted in from another musicxml file.

It was working OK until I copied 16 bars or so from the piano up to Flutes, edited a bit and then started playback. It's crashing with a malloc error.

The first time it did it there was an autosave file, and the original file from several minutes earlier.
Opening ms it prompted to restore the session. If I said "Yes" it would crash again. If I said no it would then let me browse to and open the old file.

I backed up the .autosave file and the .mscbackup folder, and started re-doing the work from the old original file. I got about the same way through it - copied DB parts, horns, and when I did the flutes again I hit CTRL-S to save, then hit play. It crashed with the same malloc error.

Unfortunately, now the saved file is un-openable. If I had not backed up the previous copy I would have lost that work, too, as it had overwritten the good file with one it cannot now open.

Attached is the backup copy of the score which does not crash (until I have made a set of changes to it), the "bad" file that musescore can not open without crashing, and log files taken by running musescore with --debug filename.mscz > logfile.txt 2>&1.

When ms crashes it seems to throw a free(): invalid next size (normal) in some cases (I think when opening a bad file directly) or malloc(): invalid next size (unsorted) when trying to restore the session.

I just spent most of the night working on another score before working on this one, so my system is "working", I guess - and I can still work on that file, it's just this one that seems to be giving me trouble.

Replication or any pointers welcome!

Attachment Size
crash-report.zip 64.14 KB

Comments

I was able to open both the pre-crash and post-crash scores.
Here's the "bad" file:
score-postcrash2.mscz
See if it opens for you.
You mention that the piano grand staff was pasted from a musicxml file. Why the unnecessary voices?
Check the last couple of measures. I deleted lots of rests in unused voices.

In reply to by Jm6stringer

That opens fine on my machine now - thanks so much! I think this solves my immediate problem but it would be nice to get to the bottom of it.

I was given the musicxml file for the piano, and am tasked with building it out to an orchestral arrangement (as a university assignment). The source appears to have been exported from sibelius, and I don't know the file's heritage before that, so it may have been through multiple conversions, hence the hairy voice assignments etc (like having almost the entire treble clef on voice 2).

I copied/pasted from the source file into a fresh session in the hope that it might launder the data somewhat and avoid causing instability (an old habit).

Thank you for doing some clean-up work there, I am hopeful that the crash may have been due to some weird data hitting a corner case on my machine but which yours was not affected by.

What OS are you running on?
Also, I notice that the mixer settings and voices look like they got cleared as well, or at least all the voices have reverted to the MS Basic sounds. I was using musesounds, so I wonder if that might have contributed to instability.

Anyway, thanks very much for "washing" the file for me, it will be revealing (and stressful!) to see if that has fixed it, or if I have some more adventure to come :-)

In reply to by ashley.gittins

Hmm... it crashed again with the same malloc error after I started moving some instruments back to the musesounds voices. I've got a script taking regular snapshots of the file now so I shouldn't get caught out again and can continue working - and it's been OK for a half hour or so now.

The best way to narrow it down might be for others to try out my "broken" file and see if it crashes for anyone else, and see if there might be a platform commonality. For now though I just need to plough on with my assignment :-)

In reply to by ashley.gittins

You wrote:
What OS are you running on?

I'm running Musescore 4.1.1 on Windows 10 with 16GB RAM.

Also, I notice that the mixer settings and voices look like they got cleared as well, or at least all the voices have reverted to the MS Basic sounds.

I still haven't embraced the multi-gigabyte MuseSounds download (solo guitarist here), so I guess my use of MS Basic sounds was saved to my attachment.

I was given the musicxml file for the piano, and am tasked with building it out to an orchestral arrangement...

Good luck with the orchestration!

In reply to by Jm6stringer

> I still haven't embraced the multi-gigabyte MuseSounds
> download (solo guitarist here), so I guess my use
> of MS Basic sounds was saved to my attachment.

Yeah, that could be it. That said though, I didn't have any more issues after that (well, I had one or two crashes, but never leading to an inability to recover the session).

> Good luck with the orchestration!

Cheers, I'm reasonably happy with the outcome given the time I had available and being my first attempt at something with this many parts:

https://youtu.be/sirtJWFYfNo

Do you still have an unanswered question? Please log in first to post your question.