Bug 478871

Summary: Memory leak / please add loop-function
Product: [Applications] kdenlive Reporter: anon <mauritius-k>
Component: Timeline & EditingAssignee: Jean-Baptiste Mardelle <jb>
Status: REPORTED ---    
Severity: major CC: fritzibaby, mauritius-k
Priority: NOR    
Version First Reported In: 23.08.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description anon 2023-12-22 08:25:51 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
Kdenlive seems to leak infinite memory, probably related to having to manually copy-paste clips to mimic a loop function.
Please fix the leak and implement a loop function. It's highly inconvenient and undynamic/static to have to copy-paste in a potentially hour-long project.


STEPS TO REPRODUCE
1. Install Kdenlive
2. Create a mid-size project (e.g. 1hr mkv clip with audio, add a few simple texts/images with fades)
3. Manually copy-paste grouped clips
4. Around 30min length, especially when maneuvering the timeline (scrolling, zooming), Kdenlive becomes drastically slower.
5. Continue further beyond 30min/1hr
6. Zoom/scroll on timeline
7. Try inserting more clips

OBSERVED RESULT
1) Seeming memory leak, probably due to mass copy-pasting clips. RAM keeps goin' up whenever inserting a new "loop iteration". At some point the app must be closed and restarted to set back RAM use to about 40% of the previous although Kdenlive will still suffer heavily from observation 2.
2) Kdenlive becomes highly inconvenient to use due to drastically slowing down.

EXPECTED RESULT
I should be able to handle at least 1 hour long, not animation/effect heavy projects.
RAM shouldnt indefinitely scale when I maneuver the timeline.
RAM & app speed shouldnt be affected as drastically when I have to loop / insert / copy-paste / move clips.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.27 x86_64
KDE Plasma Version: Plasma 5.27.10 

ADDITIONAL INFORMATION
32+GiB RAM, good AMD CPU, occurred on all my >1hr projects