RAM usage climbs over usage time #89097

Closed
opened 2021-06-13 01:03:55 +02:00 by squircle · 14 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Intel(R) UHD Graphics 630 Intel 4.5.0 - Build 27.20.100.8935

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-06-12 03:00, hash: 7b0c8097a7
Worked: 2.79b

Short description of error
The longer I actively use the program in various ways, the more memory is used until the program becomes unusable and needs to be restarted. The time until unusability is around a few minutes.

Some information:

  1. Happens even when undo memory is very low (50 MB, 8 undo steps)
  2. Happens when switching between mesh objects (maybe other objects, but the ram usage increase is only obvious with meshes)
  3. Happens when letting an animation play
  4. Happens in Edit mode when editing a mesh
  5. Happens when resizing the window

Exact steps for others to reproduce the error

  1. any .blend with at least two mesh objects (i.e. two cubes) (here is a blend with two cubes:
  2. keep clicking on different mesh objects, i.e. select Cube A, then select Cube B, then select Cube A, etc. repeat
    OR play an animation
    OR edit a mesh
    OR resize the window
  3. watch RAM usage in task manager climb up and up

Test file:
rambug.blend

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: Intel(R) UHD Graphics 630 Intel 4.5.0 - Build 27.20.100.8935 **Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-06-12 03:00, hash: `7b0c8097a7` Worked: 2.79b **Short description of error** The longer I actively use the program in various ways, the more memory is used until the program becomes unusable and needs to be restarted. The time until unusability is around a few minutes. Some information: 1. Happens even when undo memory is very low (50 MB, 8 undo steps) 2. Happens when switching between mesh objects (maybe other objects, but the ram usage increase is only obvious with meshes) 3. Happens when letting an animation play 4. Happens in Edit mode when editing a mesh 5. Happens when resizing the window **Exact steps for others to reproduce the error** 1. any .blend with at least two mesh objects (i.e. two cubes) (here is a blend with two cubes: 2. keep clicking on different mesh objects, i.e. select Cube A, then select Cube B, then select Cube A, etc. repeat OR play an animation OR edit a mesh OR resize the window 3. watch RAM usage in task manager climb up and up Test file: [rambug.blend](https://archive.blender.org/developer/F10168707/rambug.blend)
Author

Added subscriber: @squircledev

Added subscriber: @squircledev

#91544 was marked as duplicate of this issue

#91544 was marked as duplicate of this issue
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Can not reproduce behavior like this. Even when moving vertices around bit by bit, memory usage never went above 220M

Happens even when undo memory is very low (50 MB, 8 undo steps)

Does this mean, that it doesn't happen when this condition is not met?

Happens when letting an animation play

Does this mean that when you start animation playback and never stop it, eventually you will see too high memory usage?

Does this happen when you click on File > Defaults > Load Factory Settings?

Can not reproduce behavior like this. Even when moving vertices around bit by bit, memory usage never went above 220M > Happens even when undo memory is very low (50 MB, 8 undo steps) Does this mean, that it doesn't happen when this condition is not met? > Happens when letting an animation play Does this mean that when you start animation playback and never stop it, eventually you will see too high memory usage? Does this happen when you click on File > Defaults > Load Factory Settings?
Author

In #89097#1176246, @iss wrote:

Happens even when undo memory is very low (50 MB, 8 undo steps)

Does this mean, that it doesn't happen when this condition is not met?

It happens regardless of undo memory settings.

Happens when letting an animation play

Does this mean that when you start animation playback and never stop it, eventually you will see too high memory usage?

Yes.

Does this happen when you click on File > Defaults > Load Factory Settings?

Yes.

I have included a video in which you can see the memory usage climbing rapidly when I resize the window. This is after going to File > Defaults > Load Factory Settings.

nzEjLZHNWO.mp4

I have also included a video which demonstrates various actions causing (or not causing) the memory usage to climb, and tried to see how much they affected memory. These appear to include:

  • Resizing gui elements such as the size of side bars (massive amount)
  • Moving the viewport
  • Switching between tabs in the gui
    but may just be flukes, although resizing the GUI seems to definitely cause it. Also, the theme changing is because I did not redo Load Factory Settings, but I checked and it does even with Factory Settings loaded

RBwCgAbRCI.mp4

> In #89097#1176246, @iss wrote: >> Happens even when undo memory is very low (50 MB, 8 undo steps) > Does this mean, that it doesn't happen when this condition is not met? It happens regardless of undo memory settings. >> Happens when letting an animation play > Does this mean that when you start animation playback and never stop it, eventually you will see too high memory usage? Yes. > Does this happen when you click on File > Defaults > Load Factory Settings? Yes. I have included a video in which you can see the memory usage climbing rapidly when I resize the window. This is after going to File > Defaults > Load Factory Settings. [nzEjLZHNWO.mp4](https://archive.blender.org/developer/F10170317/nzEjLZHNWO.mp4) I have also included a video which demonstrates various actions causing (or not causing) the memory usage to climb, and tried to see how much they affected memory. These appear to include: - Resizing gui elements such as the size of side bars (massive amount) - Moving the viewport - Switching between tabs in the gui but may just be flukes, although resizing the GUI seems to definitely cause it. Also, the theme changing is because I did not redo Load Factory Settings, but I checked and it does even with Factory Settings loaded [RBwCgAbRCI.mp4](https://archive.blender.org/developer/F10170353/RBwCgAbRCI.mp4)

I suspect this could be caused by GPU drivers.

There is way to check if this is the case by using software opengl emulation:
From https://github.com/pal1000/mesa-dist-win/releases/tag/21.1.1 download file mesa3d-21.1.1-release-msvc.7z.
Then extract files opengl32.dll and libglapi.dll to folder where blender.exe is located.

These libraries will make Blender much slower so you probably don't want to use them long term.

Does using software opengl emulation help?

I suspect this could be caused by GPU drivers. There is way to check if this is the case by using software opengl emulation: From https://github.com/pal1000/mesa-dist-win/releases/tag/21.1.1 download file `mesa3d-21.1.1-release-msvc.7z`. Then extract files `opengl32.dll` and `libglapi.dll` to folder where blender.exe is located. These libraries will make Blender much slower so you probably don't want to use them long term. Does using software opengl emulation help?
Author

In #89097#1179949, @iss wrote:
I suspect this could be caused by GPU drivers.

There is way to check if this is the case by using software opengl emulation:
From https://github.com/pal1000/mesa-dist-win/releases/tag/21.1.1 download file mesa3d-21.1.1-release-msvc.7z.
Then extract files opengl32.dll and libglapi.dll to folder where blender.exe is located.

These libraries will make Blender much slower so you probably don't want to use them long term.

Does using software opengl emulation help?

Yes it helps! I just used this on a nightly, extracting the appropriate x64 opengl32.dll and libglapi.dll to my x64 Blender 3.0.0 alpha from last night, and while it does run slower, I can no longer reproduce the issue. The RAM usage does not appear to increase steadily over active usage

Here were the drivers I was using, which are Dell's OEM drivers: Intel(R) UHD Graphics 630 Intel 4.5.0 - Build 27.20.100.8935, dated as 10/28/2020

I did check with the latest GPU drivers, and even on the latest drivers installed, Build 27.20.100.9466 dated as 3/30/2021, the problem persists when not using those files.

I will be using this workaround for as long as this is an issue, so thank you for showing me how to circumvent the issue. I do not need Blender to run at full performance for what I do so this is fine by me. I will be continuing to provide information as requested and such for this issue.

> In #89097#1179949, @iss wrote: > I suspect this could be caused by GPU drivers. > > There is way to check if this is the case by using software opengl emulation: > From https://github.com/pal1000/mesa-dist-win/releases/tag/21.1.1 download file `mesa3d-21.1.1-release-msvc.7z`. > Then extract files `opengl32.dll` and `libglapi.dll` to folder where blender.exe is located. > > These libraries will make Blender much slower so you probably don't want to use them long term. > > Does using software opengl emulation help? Yes it helps! I just used this on a nightly, extracting the appropriate x64 opengl32.dll and libglapi.dll to my x64 Blender 3.0.0 alpha from last night, and while it does run slower, I can no longer reproduce the issue. The RAM usage does not appear to increase steadily over active usage Here were the drivers I was using, which are Dell's OEM drivers: Intel(R) UHD Graphics 630 Intel 4.5.0 - Build 27.20.100.8935, dated as 10/28/2020 I did check with the latest GPU drivers, and even on the latest drivers installed, Build 27.20.100.9466 dated as 3/30/2021, the problem persists when not using those files. I will be using this workaround for as long as this is an issue, so thank you for showing me how to circumvent the issue. I do not need Blender to run at full performance for what I do so this is fine by me. I will be continuing to provide information as requested and such for this issue.

@squircledev can you run Blender form console with argument blender.exe --debug-memory and paste output here? There is chance that leak could be prevented if we are aware of it, but if not I will have to close this report.

@squircledev can you run Blender form console with argument `blender.exe --debug-memory` and paste output here? There is chance that leak could be prevented if we are aware of it, but if not I will have to close this report.
Author

@iss when I do that, all I get is

Switching to fully guarded memory allocator.
Read prefs: C:\Users\damon\AppData\Roaming\Blender Foundation\Blender\3.0\config\userpref.blend
Saved session recovery to 'C:\Users\damon\AppData\Local\Temp\quit.blend'

Blender quit

Not sure if I'm supposed to be doing something else? When I resize the window and memory usage goes up it still doesn't say anything in the console

@iss when I do that, all I get is ``` Switching to fully guarded memory allocator. Read prefs: C:\Users\damon\AppData\Roaming\Blender Foundation\Blender\3.0\config\userpref.blend Saved session recovery to 'C:\Users\damon\AppData\Local\Temp\quit.blend' Blender quit ``` Not sure if I'm supposed to be doing something else? When I resize the window and memory usage goes up it still doesn't say anything in the console

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'

Thanks for update. If there was unfreed memory, there would be line with something like Error: Not freed memory blocks: 2, total unfreed memory 0.006088 MB

Since there isn't line like this, this means this leak is beyond our control and not a bug in Blender.

Thanks for update. If there was unfreed memory, there would be line with something like `Error: Not freed memory blocks: 2, total unfreed memory 0.006088 MB` Since there isn't line like this, this means this leak is beyond our control and not a bug in Blender.

Added subscriber: @AmperLevias

Added subscriber: @AmperLevias
Sign in to join this conversation.
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#89097
No description provided.