Hang on Cleanup

I am using ardour 8.2.0 on avlinux AMD Ryzen 5 5600G;32G RAM. This has been bugging me since ardour4. I record a track which makes a region and a file (interchange/session/audiofiles/1.wav). I delete this region. I go to clean-up unused sources and the list of files starts filling up the screen. When it gets to 1.wav it hangs. By running bash top I see that ardourgui is using > 130% CPU. If I switch workspaces and come back ardour has gone blank and I have to use xkill to stop it. What is going on here? Can anyone give me the algorithm by which ardour identifies sources for clean-up?

You should first try 8.12 before attempting to figure anything else out. Unless you mean to write 8.12 already, instead of 8.2 …

The algorithm is much too complex to describe here. If some reason you do actually want to read it, you can find the source here:

Thanks for your response. I’m not sure I understand “8.12”. I am using ardour version 8.2.0 (as returned by clicking on help->about) . Wouldn’t 8.2.0 not supersede 8.12. Anyhow, here’s another way to ask my question: How could a simple bash script parse session.ardour and know that a wav file (1.wav) was not being used by anything and therefore could be deleted? Then how could session.ardour be updated to remove references to this wav file? I, of course would prefer to use the tools provided by the GUI but, as I’ve said this can sometimes lead to ugly behavior.

Paul is asking to test the most recent release, which is Ardour 8.12 (released March 11, 2025, see Ardour 8.12 — What's new | Ardour DAW). Ardour 8.2 was released on December 23, 2023, 1.5 years ago, see Ardour 8.2 — What's new | Ardour DAW. You can install the demo of Ardour 8.12 (download from ardour.org) alongside 8.2 if you do not want to upgrade immediately.

No.

12 is a bigger number than 2.

:stuck_out_tongue_winking_eye:

Cheers,

Keith

1 Like

So what Paul provided was all the code currently used to check for exactly this. You can go through it and try to follow the logic behind why a region is removed, it is a bit more complex than just, is it never used in session ‘X’ because it also checks all snapshots for instance, where removing a file because it isn’t used in one session file, might break snapshots from previously, so you really don’t want to remove it, etc.

If you ignore all the corner cases, writing a bash script to do this is a matter of opening the XML, searching for sources, identifying if there are any regions using those sources, and if not removing them. But as I mentioned above, that has the potential to remove sources that are still in actual use and breaking things in some cases.

Seablade

Thanks. I do feel (not a bit) foolish about the 7.12 thing. I’ll try to be more careful about my future postings. I’ll try 7.12.

8.12 please:)

Seablade

More useful would be to find out where Ardour hangs. The workflow is the same as getting a crash report: Debugging Ardour | Ardour DAW

Open a Terminal window and start Ardour in gdb:

Ardour8 --gdb

then on the gdb prompt:

(gdb) run  <press enter>

Get Ardour to hang during Cleanup, return to the Terminal window and press Ctrl +C to interrupt Ardour. This returns you to the gdb prompt.
Then get a backtrace:

(gdb) bt <press enter>

@ccee

Since you are an AV Linux User there is an updated 8.12 Package available, it is the official Ardour binary formatted into a Debian package, other than on the AV Linux ISO’s I don’t make a habit of packaging every Ardour release but there were a few buggy versions between 8.2 and 8.12 and in the interim while Ardour 9 is getting worked on I thought it best to have a solid version available.

You can find it here: Ardour 8.12