mltframework / mltframework/shotcut
Repeatedly opening file from Recent-pane and immediate Close leaks a bit memory
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 11h 27m
- Merged PRs (30d)
- 5
Description
Testing open mp4-file from Recent-pane and then immediate close (Ctrl-W).
Fedora 29 flatpak-build: v18.11.18
I see the RssAnon/VmData field increasing for each open/close-cycle.
[henning@satellite ~]$ cat /proc/$(pgrep shotcut)/status
Name: shotcut
Umask: 0002
State: S (sleeping)
Tgid: 9106
Ngid: 0
Pid: 9106
PPid: 9105
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1001 1001 1001 1001
FDSize: 64
Groups: 10 975 1000 1001 1002 1003
NStgid: 9106 2
NSpid: 9106 2
NSpgid: 9096 0
NSsid: 2065 0
VmPeak: 2951904 kB
VmSize: 2742156 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 365344 kB
VmRSS: 358556 kB
RssAnon: 260100 kB
RssFile: 89184 kB
RssShmem: 9272 kB
VmData: 535040 kB
VmStk: 136 kB
VmExe: 2764 kB
VmLib: 197088 kB
VmPTE: 1900 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 0
Threads: 14
SigQ: 0/23119
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000001000
SigCgt: 0000000180000000
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000000000000000
CapAmb: 0000000000000000
NoNewPrivs: 1
Seccomp: 2
Speculation_Store_Bypass: thread force mitigated
Cpus_allowed: ff
Cpus_allowed_list: 0-7
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 45700
nonvoluntary_ctxt_switches: 23991
`
I also see two Audio Opnened during close in the app log.
`[Debug ] <MainWindow::open> "/home/henning/Nedlastinger/test.mp4"
[Debug ] <MltXmlChecker::MltXmlChecker> decimal point ','
[Debug ] <MltXmlChecker::check> begin
[Debug ] <MltXmlChecker::check> end
[Debug ] <MLT> [producer avformat] "/home/henning/Nedlastinger/test.mp4" checking VFR: pkt.duration 512
[swscaler @ 0x88ab700] YUV color matrix differs for YUV->YUV, using intermediate RGB to convert
[Debug ] <MainWindow::setAudioChannels> 1
[Debug ] <Mlt::Controller::setAudioChannels> 1
[Info ] <MainWindow::open> "/home/henning/Nedlastinger/test.mp4"
[Info ] <MLT> [consumer sdl2_audio] Audio Opened: driver=pulseaudio channels=1 frequency=48000
[Debug ] <MainWindow::on_actionClose_triggered>
[Debug ] <Mlt::Controller::setProjectFolder> project folder ""
[Debug ] <MainWindow::setAudioChannels> 1
[Debug ] <Mlt::Controller::setAudioChannels> 1
[Info ] <MLT> [consumer sdl2_audio] Audio Opened: driver=pulseaudio channels=1 frequency=48000
[Info ] <MLT> [consumer sdl2_audio] Audio Opened: driver=pulseaudio channels=1 frequency=48000
[Debug ] <MainWindow::setProfile> ""
[Debug ] <Mlt::Controller::setProfile> setting to profile "Automatic"
`
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by opening an MP4 from the Recent pane and immediately pressing Ctrl-W, then compare RssAnon/VmData in /proc status and review the application log. Investigate the close path associated with MainWindow::on_actionClose_triggered and the repeated Audio Opened messages. Done means repeated open/close cycles no longer show unbounded memory growth or duplicate audio openings.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100