-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
System and IINA version:
- macOS 11.4
- IINA 1.2.0
Expected behavior:
IINA should not leak memory
Actual behavior:
IINA 1.2.0 (mpv 0.32.0) is leaking objects containing the string "advanced_editlist":
4 (80 bytes) ROOT LEAK: 0x7fea47639c80 [16]
3 (64 bytes) 0x600001bbeef0 [16]
1 (32 bytes) 0x6000019ca0e0 [32] length: 17 "advanced_editlist"
1 (16 bytes) 0x600001bbef30 [16] length: 1 "0"
This string is a part of a FFmpeg AVDictionary
object being leaked by mpv. The problem is still present in the latest mpv release as of this writing, 0.33.1. The issue has been fixed in mpv on the master branch by the following commit made a few days after 0.33.1 was released: demux_lavf: fix minor memory leaks
IINA will either need to apply a patch to mpv with the simple code change in that commit or wait for a mpv release with the fix.
Full output from the leaks
tool below. The leak this issue is concerned with is the last leak listed.
Output from leaks:
low-batt@gag ~$ leaks 66146 Process: IINA [66146] Path: /Users/USER/Library/Developer/Xcode/DerivedData/iina-echacgeisxgbwucwumppkhklmnkd/Build/Products/Debug/IINA.app/Contents/MacOS/IINA Load Address: 0x10e3c3000 Identifier: com.colliderli.iina Version: 1.2.0 (202107232224) Code Type: X86-64 Platform: macOS Parent Process: ??? [1]Date/Time: 2021-07-25 15:32:08.285 -0400
Launch Time: 2021-07-25 15:30:31.625 -0400
OS Version: macOS 11.4 (20F71)
Report Version: 7
Analysis Tool: /usr/bin/leaks
Physical footprint: 72.2M
Physical footprint (peak): 84.9M
leaks Report Version: 4.0
Process 66146: 83699 nodes malloced for 49834 KB
Process 66146: 25 leaks for 2448 total leaked bytes.
25 (2.39K) << TOTAL >>
1 (928 bytes) ROOT LEAK: <MenuController 0x7fea47606c20> [928]
2 (144 bytes) ROOT CYCLE: 0x600000c09940 [64]
1 (80 bytes) ROOT CYCLE: 0x600003adecb0 [80]
CYCLE BACK TO 0x600000c09940 [64]
2 (144 bytes) ROOT CYCLE: 0x600000c14d80 [64]
1 (80 bytes) ROOT CYCLE: 0x600003aaa2b0 [80]
CYCLE BACK TO 0x600000c14d80 [64]
2 (144 bytes) ROOT CYCLE: 0x600000c14ec0 [64]
1 (80 bytes) ROOT CYCLE: 0x600003aaa1c0 [80]
CYCLE BACK TO 0x600000c14ec0 [64]
2 (144 bytes) ROOT CYCLE: 0x600000c34d40 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a885f0 [80]
CYCLE BACK TO 0x600000c34d40 [64]
2 (144 bytes) ROOT CYCLE: 0x600000ca0980 [64]
1 (80 bytes) ROOT CYCLE: 0x600003aee300 [80]
CYCLE BACK TO 0x600000ca0980 [64]
2 (144 bytes) ROOT CYCLE: 0x600000cf4100 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a93610 [80]
CYCLE BACK TO 0x600000cf4100 [64]
2 (144 bytes) ROOT CYCLE: 0x600000cf4300 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a93390 [80]
CYCLE BACK TO 0x600000cf4300 [64]
2 (144 bytes) ROOT CYCLE: 0x600000cf4480 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a93250 [80]
CYCLE BACK TO 0x600000cf4480 [64]
2 (144 bytes) ROOT CYCLE: 0x600000cf4540 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a93430 [80]
CYCLE BACK TO 0x600000cf4540 [64]
2 (144 bytes) ROOT CYCLE: 0x600000cf4600 [64]
1 (80 bytes) ROOT CYCLE: 0x600003a932a0 [80]
CYCLE BACK TO 0x600000cf4600 [64]
4 (80 bytes) ROOT LEAK: 0x7fea47639c80 [16]
3 (64 bytes) 0x600001bbeef0 [16]
1 (32 bytes) 0x6000019ca0e0 [32] length: 17 "advanced_editlist"
1 (16 bytes) 0x600001bbef30 [16] length: 1 "0"
low-batt@gag ~$
Steps to reproduce:
Open a video, close the window, run the leaks
tool.
- MPV does not have this problem.
As discussed above this a problem with mpv that has been fixed. IINA needs to incorporate the fix.
How often does this happen?
Every time.