Memory consumption beyond defined limit when entering-exiting Edit mode #88010

Closed
opened 2021-05-04 00:09:27 +02:00 by Vyacheslav Kobozev · 23 comments

System Information
Operating system: Windows-8.1-6.3.9600-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-01 15:22, hash: 7c5e009655
Worked: 2.79b at least with one hi-res mesh

Short description of error
Just enter and exit edit mode consumes memory very fast.
Editing UV in multiresolution object too.
Undo memory limit do not help at all.
I'll test more

leak.mp4

**System Information** Operating system: Windows-8.1-6.3.9600-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 660 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-01 15:22, hash: `7c5e009655` Worked: 2.79b at least with one hi-res mesh **Short description of error** Just enter and exit edit mode consumes memory very fast. Editing UV in multiresolution object too. Undo memory limit do not help at all. I'll test more [leak.mp4](https://archive.blender.org/developer/F10051928/leak.mp4)

Added subscriber: @Vyach

Added subscriber: @Vyach

#100036 was marked as duplicate of this issue

#100036 was marked as duplicate of this issue

#94474 was marked as duplicate of this issue

#94474 was marked as duplicate of this issue

Added subscriber: @mano-wii

Added subscriber: @mano-wii

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

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

Try run the blender from the command line. If there is a memory leak, when closing Blender the console will probably point. Otherwise, there must be poor memory management on the undo system somewhere.
https://docs.blender.org/manual/en/latest/advanced/command_line/launch/windows.html

This report does not contain all information required for us to investigate the issue.
For this bug, we need an example with extreme case.

(Increase in memory consumption when entering and exiting edit mode is expected).

Try run the blender from the command line. If there is a memory leak, when closing Blender the console will probably point. Otherwise, there must be poor memory management on the undo system somewhere. https://docs.blender.org/manual/en/latest/advanced/command_line/launch/windows.html This report does not contain all information required for us to investigate the issue. For this bug, we need an example with extreme case. (Increase in memory consumption when entering and exiting edit mode is expected).
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

@Vyach : was there any more findings?
Could you share a file where this happens?

@Vyach : was there any more findings? Could you share a file where this happens?

@lichtwerk I tested more. Memory consumed to undo steps. So it is about undo management, that writes big scene to memory even if nothing happens

@lichtwerk I tested more. Memory consumed to undo steps. So it is about undo management, that writes big scene to memory even if nothing happens
Member

Added subscribers: @mont29, @ideasman42

Added subscribers: @mont29, @ideasman42
Member

Just checking if we are talking about the same thing:

  • I cannot spot a leak [that is reported in the console as @mano-wii pointed out and is not properly freed]
  • I can spot an increase in memory consumption in editmode selection toggling
  • I can spot a decrease in memory consumption in objectmode selection toggling
  • this is not dependent on multires or the UV Editor at all
  • this makes sense though, blender fills editmode undo steps [and each of them needs space] -- in the following video, it grows until my 32 steps are filled and then is stable
  • in objectmode, these editmode steps are freed one-by-one I assume, so decrease also makes sense, no?
  • if you bring down the Undo steps in Preferences, I see now rise in memory consumption at all

#88010.webm

So it all comes down to the size of undo steps, and yes, this could probably see more optimizations (not an expert here, but blender keeps (part of the) file at a particular state in memory)
https://wiki.blender.org/wiki/Source/Architecture/Undo is probably out-of-date, for the real details @ideasman42 and @mont29 could probably tell more.

Having said all this, I dont think there is a bug here.
@Vyach : could you confirm that memory goes down again with objectmode steps (or that it does not rise Undo steps set to 0)? So basically that this all gets freed properly and no leak is reported in the console?

Just checking if we are talking about the same thing: - I cannot spot a **leak** [that is reported in the console as @mano-wii pointed out and is **not properly freed**] - I can spot an increase in memory consumption in editmode selection toggling - I can spot a decrease in memory consumption in objectmode selection toggling - this is not dependent on multires or the UV Editor at all - this makes sense though, blender fills editmode undo steps [and each of them needs space] -- in the following video, it grows until my 32 steps are filled and then is stable - in objectmode, these editmode steps are freed one-by-one I assume, so decrease also makes sense, no? - if you bring down the Undo steps in Preferences, I see now rise in memory consumption at all [#88010.webm](https://archive.blender.org/developer/F10146513/T88010.webm) So it all comes down to the size of undo steps, and yes, this could probably see more optimizations (not an expert here, but blender keeps (part of the) file at a particular state in memory) https://wiki.blender.org/wiki/Source/Architecture/Undo is probably out-of-date, for the real details @ideasman42 and @mont29 could probably tell more. Having said all this, I dont think there is a bug here. @Vyach : could you confirm that memory goes down again with objectmode steps (or that it does not rise Undo steps set to 0)? So basically that this all gets freed properly and no leak is reported in the console?

@lichtwerk I found the file where issue is heavy and yes, decreasing undo steps to 3 removes the issue.

Usually, when there is a lot of undo steps allowed, memory consumption go down, when I go object mode.
But with rhis file — it don`t

Also, when I limit undo size, I expect, it will limit memory consumption and override undo steps. Should it?

I can`t make this file public, but you can leave e-mail, so I can share private.

2021-05-31_11-29-54.mp4

@lichtwerk I found the file where issue is heavy and yes, decreasing undo steps to 3 removes the issue. Usually, when there is a lot of undo steps allowed, memory consumption go down, when I go object mode. But with rhis file — it don`t Also, when I limit undo size, I expect, it will limit memory consumption and override undo steps. Should it? I can`t make this file public, but you can leave e-mail, so I can share private. [2021-05-31_11-29-54.mp4](https://archive.blender.org/developer/F10150373/2021-05-31_11-29-54.mp4)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

could you confirm that memory goes down again with objectmode steps

@lichtwerk , memory goes down when switching to object mode but then again increase after moving to edit mode (when undo steps are maximum)

this is not dependent on multires or the UV Editor at all

I can also comment, this is not related to UV editor.

>could you confirm that memory goes down again with objectmode steps @lichtwerk , memory goes down when switching to object mode but then again increase after moving to edit mode (when undo steps are maximum) >this is not dependent on multires or the UV Editor at all I can also comment, this is not related to UV editor.

I do not really understand what is the issue here... Yes, if you have a fairly high resolution mesh and go in edit mode for it, each undo step can consumes quite a lot of memory. Unlike in Object mode, each undo step in Edit mode will have to store (part of) the geometry. There is nothing surprising here, improvements and optimizations are always possible of course, but... definitely not a topic for bug tracker.

If you cannot provide us your actual work file, you should be able to make a dummy one exhibiting the same issue (heavily subdivided cube e.g.?)...

In any case, unless you can provide us with proper material to investigate, there is not much point in keeping this thread open imho.

I do not really understand what is the issue here... Yes, if you have a fairly high resolution mesh and go in edit mode for it, each undo step can consumes quite a lot of memory. Unlike in Object mode, each undo step in Edit mode will have to store (part of) the geometry. There is nothing surprising here, improvements and optimizations are always possible of course, but... definitely not a topic for bug tracker. If you cannot provide us your actual work file, you should be able to make a dummy one exhibiting the same issue (heavily subdivided cube e.g.?)... In any case, unless you can provide us with proper material to investigate, there is not much point in keeping this thread open imho.

In #88010#1172351, @mont29 wrote:
I do not really understand what is the issue here...

Issue is unexpected behaviour or inappropriate title (undo memory limit).
When I limit undo to 10 Gb, I expect, than Blender will not consume more than 10 Gb RAM for undo.

If you cannot provide

okay, I found part with issue. And subdivided cube not the case.
memoryTest1.blend

As you can see entering and exiting edit mode consumes memory constantly and over the undo limit.
2021-06-07_16-19-23.mp4

> In #88010#1172351, @mont29 wrote: > I do not really understand what is the issue here... Issue is unexpected behaviour or inappropriate title (undo memory limit). When I limit undo to 10 Gb, I expect, than Blender will not consume more than 10 Gb RAM for undo. >If you cannot provide okay, I found part with issue. And subdivided cube not the case. [memoryTest1.blend](https://archive.blender.org/developer/F10160942/memoryTest1.blend) As you can see entering and exiting edit mode consumes memory constantly and over the undo limit. [2021-06-07_16-19-23.mp4](https://archive.blender.org/developer/F10160870/2021-06-07_16-19-23.mp4)

Also i found, that even 2.79 have increasing memory consumption with exact same object

Also i found, that even 2.79 have increasing memory consumption with exact same object
Vyacheslav Kobozev changed title from Regression: memory leak with no changes (enter-exit edit mode) to Memory leak with no changes (enter-exit edit mode) 2021-06-07 15:45:38 +02:00
Bastien Montagne changed title from Memory leak with no changes (enter-exit edit mode) to Memory comsumption beyond defined limit when entering-exiting Edit mode 2021-06-07 15:47:33 +02:00
Bastien Montagne changed title from Memory comsumption beyond defined limit when entering-exiting Edit mode to Memory consumption beyond defined limit when entering-exiting Edit mode 2021-06-07 15:53:33 +02:00

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

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

Can confirm that entering/leaving Edit mode in that file quickly uses Gb of RAM, and does not abide to the defined limit at all...

Can confirm that entering/leaving Edit mode in that file quickly uses Gb of RAM, and does not abide to the defined limit at all...
Member

Added subscribers: @visturine, @michael64, @chemicalcrux

Added subscribers: @visturine, @michael64, @chemicalcrux
Member

Added subscriber: @mdheydgege

Added subscriber: @mdheydgege

poke

poke

Added subscriber: @TheRedWaxPolice

Added subscriber: @TheRedWaxPolice
Philipp Oeser removed the
Interest
Core
label 2023-02-09 14:43:11 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-06-05 15:35:14 +02:00
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
7 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#88010
No description provided.