Everytime I try to create a snapshot Ardour crashes.
It makes no difference if I choose to “keep working on current version” or “switch to new version”. It crashes either way.
What am I supposed to do?
Is it possible as a workaround to just copy the project file with a new name and open that or does the snapshot process do anything in the background I have to consider?
What I can already say is that it only occurs in this specific session.
I had 2 crashes with this session before that whole snapshot thing. What caused these first crashes I don’t know. Maybe an overload of too many MIDI regions causing problems with GUI redraw (at least that’s what ChatGPT said), in both cases Ardour was just gone all of a sudden.
Both times I recovered the from the crash backup data but maybe that currupted some data in the sessions file.
As for the debugging thing, that will take me some time to figure it out. I can maybe give a backtrace tomorrow.
EDIT:
Bad news. I am not able get a backtrace, I tried both versions from the debugging guide.
I think I get no crash output because technically Ardour doesn’t really crash.
So I will be more precise:
When I want to create a snapshot, the dialog pops up to enter a name, I enter a name, I click save and then Ardour freezes completely. It does absolutely nothing and eventually it will turn grey and then a popup comes up telling me that Ardour is not responding and if I want to terminate the application. I click terminate and then Ardour closes.
That’s probably why, in gdb I see the output that Ardour terminated with a SIGKIL. So technically it doesn’t crash.
What is the debugging process for a freezing Ardour?
Ctrl +C in gdb while Ardour is frozen (don’t kill it using the GUI). That returns you to the gdb prompt. Then get a backtrace which should indicate where Ardour hangs.
Ok, that really was a lot of output, at least I got something, not sure if I did it correctly.
How am I supposed to post this here? The output exceeds the character limit of this forum and I cannot attach a textfile with this post, because only image extensions are allowed.
That command says I have 5801 midifiles, which totaly can’t be true.
If I would calculate 1 midifile per bar for all midi tracks I would get a maximum of 1420 midifiles.
However, there are only 4-5 tracks that are this dense. The other tracks only contain partial midi files here and there.
As I already said, I assume the amount of midi files in my session to have caused the first 2 crashes, so I consultet ChatGPT, who told me consolidating individual midi parts into larger midi chunks is helping performance, so I did.
I consolidated as much together as possible with selecting midi parts > right click > Selected regions > Edit > Combine.
As of now I have a total of 142 midi parts in my session.
I got it solved now!
I now ran Session > Clean-Up > Clean-up unused sources, which identified around 5700 unused files. The popup told me that after a restart of Ardour the diskspace will be cleaned, so I restarted Ardour.
Now
ls <session_dir>/interchange/<session_name>/midifiles/ | wc -l
tells my I’m left with only 165 midi files.
Now I tried creating a snapshot and it worked
This was my first time using midi so extensively and next time I sure will be smarter and keep the session cleaner.
Sorry for the inconvenience and thanks so much for the support.
This might have happened because Ardour made copies of every midi file when saving snapshots. If you set Session / Properties / MIDI / Midi region copies are independent = False then the problem is alleviated somewhat since manually making copies of midi - regions no longer makes physical copies.
I previously created drum tracks by drawing a midi region 4 - 8 eight patterns long and clicking drum-midi manually onto that then duplicating that region many times. It seems a better way to do this is to create one midi region as long as the song then clicking one drum pattern onto it and then duplicating the midi events inside the region to cover the whole song. This creates only one midi region and you won’t risk running into slowdowns caused by thousands of duplicated regions after making some tens of session snapshots.