View Issue Details

IDCategoryLast Update
0006898bugs2018-01-13 13:00
ReporteraeLiXihrAssigned To 
Reproducibilityhave not tried 
Status confirmedResolutionopen 
PlatformKX studioOSGNU/LinuxOS VersionKXStudio 14.04.2
Product Version5.12 
Fixed in Version 
Summary0006898: ardour freezes during clean-up
DescriptionKXStudio 14.04.2 LTS - Release amd64

Dear all,
i have had a problem with Clean-up for a while:
If i go to Session>Clean-up>Clean-up Unused Sources...>Clean-up nothing happens. The popup below does not appear
Ardour freezes and if i try to close Ardour it takes a while and an "Ardour is not responding"screen pops up.

I ran in gdb and that is here:
If you tell me how i would attach my session file as well.

I found out: if i try to uncombine the first compounds from Droomvlucht-solo(@ 07:13:21:08, tracks: "gitaar-room" and "gitaar" ) they are deleted.

(i have the original session file(without -3001) too but it cannot be attached?, pressing browse nothing happens)
nb: i hope i filled in everything correctly: any questions, just ask please :)
TagsNo tags attached.



2016-06-18 08:14


rommelen-3001.ardour (3,988,339 bytes)


2016-06-18 09:47


rommelen.ardour (3,988,339 bytes)


2017-12-22 12:37

reporter   ~0020109

the issue persists in Ardour 5.12


2018-01-11 13:07

developer   ~0020114

I can reproduce the freezing issue with cleanup sources and the Session you have attached with 5.12

Based on the gdb backtrace you have referenced and the comment in SessionPlaylist::source_use_count () there may be circular references between compound regions and this is causing an infinite loop/freeze.

Thanks for taking the time to report this and attaching a Session that can be used to reproduce the issue.


2018-01-13 13:00


Ardour-5.12.bug6898.trace.tar.xz (3,346,648 bytes)


2018-01-13 13:00

developer   ~0020115

I've attached a trace that can be loaded in chrome://tracing that shows the function calls occurring with this session when calling Session::cleanup(At least the first few seconds before I have to interrupt the process so as to not write too large a trace file).

It indicates that the amount of deep nesting (8-9 levels at least) of compound regions in combination with the number of sources in this session may be causing the freezing as in the trace it is still processing the first source out of 0000109:0000400 after 4 seconds.

I'm unsure that the freeze is actually infinite at this point and how there can be circular references.

It does definitely indicate that another method of processing the sources to determine which ones can be "cleaned up" is perhaps needed.

It seems like a method in which each snapshot is loaded and then determining unused sources based on the reference count of the source would much quicker, or possibly just something like storing the Source reference count in a property of the Source on save and using that instead.

Issue History

Date Modified Username Field Change
2016-06-18 08:14 aeLiXihr New Issue
2016-06-18 08:14 aeLiXihr File Added: rommelen-3001.ardour
2016-06-18 09:47 aeLiXihr File Added: rommelen.ardour
2017-12-22 12:37 aeLiXihr Note Added: 0020109
2018-01-11 13:07 timbyr Note Added: 0020114
2018-01-11 13:08 timbyr Status new => confirmed
2018-01-11 13:08 timbyr Product Version => 5.12
2018-01-13 13:00 timbyr File Added: Ardour-5.12.bug6898.trace.tar.xz
2018-01-13 13:00 timbyr Note Added: 0020115