VSE: Memory leak importing bunch of medias #91110
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#91110
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows 10
Graphics card: GTX 1070Ti
Blender Version
Broken: 2.93.4
b7205031ce
candidateShort description of error
RAM increases a continuously while importing new movies when new sounds have no impact.
Exact steps for others to reproduce the error
Video Editing
app template and open a script windowNB
Maybe the following observations are related:
Images
I've done some benchs:
Start, save, open recent
Start, delete created seq
Start, save, close blender, open saved .blend
Added subscriber: @Miadim
Added subscribers: @iss, @lichtwerk
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Isnt this just the memory used to build the Proxies? https://docs.blender.org/manual/en/dev/video_editing/sequencer/sidebar/proxy.html
Once they are done, memory gets slowly freed again.
Opening that file again does not have to build the proxies again, so no memory increase here.
Calling this a
memory leak
is misleading I think since would only be the case if memory is not freed if blender closes etc.Blender would also usually report a real leak if started from the commandline in the console.
@iss: this is expected behavior, no?
Yes I hesitated to call it
Memory not freed
. Maybe it's not a memory leak, but why the memory isn't freed right after the proxies are built? It shouldn't be a flat part remaining until I close, delete or open another .blend. It must freed instantly when the python process is done, no?Also, I've tried the same steps I listed with Proxy Setup to
Manual
and I get the exact same result.Changed status from 'Needs Developer To Reproduce' to: 'Archived'
This is not caused by proxy building, even though proxy building would double memory usage. Issue is, that each movie file handle will allocate some memory within ffmpeg. In my case it is about 200MB. This depends on codec settings, but mainly on movie resolution.
I thought this could be bug, because added files don't have to be kept open, which is technically true, but in practice it doesn't make much sense to add movie, open it(for internal purposes), close it and then open it again, because user will try to render it. Also if you would try to render each movie file this memory would be allocated over time anyway. Trouble is that Blender doesn't have idea about this allocated memory, because it is done by external library, so number of open files can't be managed during runtime. Perhaps if amount of open files is limited, but since amount of memory needed is quite variable, this wouldn't work in practice.
So unfortunately this is not even design limitation, but completely outside of our ability to resolve this issue, so I will close this report.
However, as we talked on blender.chat, importer scripts could have ability to skip file opening, which would resolve this issue partially, editing of large amount of movie files is still possible to limited extent (movies can be unloaded manually by pressing Ctrl+R) and rendering does "close" or free all movies file for every frame, so memory usage is kept low. Minor problem here is, that we have argument
fit_method
that would be disfunctional with fast loading mode (this also can be resolved though).