shotcut
shotcut copied to clipboard
Repeatedly opening file from Recent-pane and immediate Close leaks a bit memory
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"
`
I also see two Audio Opnened during close in the app log.
This is expected because File > Close does not really close; rather, it opens a color producer twice and hides it. Yes, it is a kludge to prevent having to avoid doing deeper level work to really disconnect and close things. It is not high on my list of things to do. It would be helpful if you can supply a patch.