Regression: Blender crashes when moving grease pencil object has any invisible layers #98853

Closed
opened 2022-06-13 17:38:51 +02:00 by Hazuki Aoi · 22 comments

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79

Blender Version
Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: e05e1e3691
Worked: 3.1.2

This first started to crash with 7ca13eef7c, crash got fixed with 21d633f83b (but then slowness/leak appeared).

Short description of error
when a grease pencil object has any invisible layers and press g key or use handle yo move object, blender will become very slow and crash.

And I upload video and blender file here to show how it.
BlenderGPCrash.mp4
GP_Crash.blend

**System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3070 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79 **Blender Version** Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: `e05e1e3691` Worked: 3.1.2 This first started to crash with 7ca13eef7c, crash got fixed with 21d633f83b (but then slowness/leak appeared). **Short description of error** when a grease pencil object has any invisible layers and press g key or use handle yo move object, blender will become very slow and crash. And I upload video and blender file here to show how it. [BlenderGPCrash.mp4](https://archive.blender.org/developer/F13156765/BlenderGPCrash.mp4) [GP_Crash.blend](https://archive.blender.org/developer/F13156771/GP_Crash.blend)
Author

Added subscriber: @hazukiaoi

Added subscriber: @hazukiaoi

#99020 was marked as duplicate of this issue

#99020 was marked as duplicate of this issue

Added subscriber: @frogstomp-4

Added subscriber: @frogstomp-4

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

Can confirm in 3.2.0 and 3.3a.

Memory leak, gets more noticeable when more layers are hidden. Got to 16k memory consumption in seconds.

Can confirm in 3.2.0 and 3.3a. Memory leak, gets more noticeable when more layers are hidden. Got to 16k memory consumption in seconds.

@hazukiaoi problem appears to be mirror modifier, you have 3 of them enabled. If you disable mirror modifier it performs normally.

@hazukiaoi problem appears to be mirror modifier, you have 3 of them enabled. If you disable mirror modifier it performs normally.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Looks like a regression, will bisect.

Looks like a regression, will bisect.

Adding array or multiple strokes modifier also produces memory leak. Looks like modifier that add new geometry are affected.

Adding array or multiple strokes modifier also produces memory leak. Looks like modifier that add new geometry are affected.
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

This first started to crash with 7ca13eef7c, crash got fixed with 21d633f83b (but then slowness/leak appeared).

CC @filedescriptor

This first started to crash with 7ca13eef7c, crash got fixed with 21d633f83b (but then slowness/leak appeared). CC @filedescriptor
Philipp Oeser changed title from Blender crashes when moving grease pencil object has any invisible layers to Regression: Blender crashes when moving grease pencil object has any invisible layers 2022-06-14 10:12:10 +02:00
Falk David self-assigned this 2022-06-14 14:57:00 +02:00
Member

Looking into it!

Looking into it!
Member

Added subscriber: @antoniov

Added subscriber: @antoniov
Member

Ok so whats happening is that the modifier keeps adding new frames to the evaluated object resulting in an exponential increase. This is because when preparing the data for the modifiers we only copy visible strokes to the eval object. But the modifiers do not consider visibility and will generate the mirrored strokes even for layers that are hidden. Because those layers have not been copied (only their structure) we run into this issue.

There are a couple of options to fix this:

  1. always copy the active frame of all layers (even if the layer is hidden)
  2. prevent modifiers from generating strokes of hidden layers

@antoniov Any thoughts on this?

Ok so whats happening is that the modifier keeps adding new frames to the evaluated object resulting in an exponential increase. This is because when preparing the data for the modifiers we only copy visible strokes to the eval object. But the modifiers do not consider visibility and will generate the mirrored strokes even for layers that are hidden. Because those layers have not been copied (only their structure) we run into this issue. There are a couple of options to fix this: 1) always copy the active frame of all layers (even if the layer is hidden) 2) prevent modifiers from generating strokes of hidden layers @antoniov Any thoughts on this?
Member

Here is a fix using the first method: P3004

Here is a fix using the first method: [P3004](https://archive.blender.org/developer/P3004.txt)

The option 1) is slower but I will go for this one. The active frame would be always available, so better copy always the data.

The option 1) is slower but I will go for this one. The active frame would be always available, so better copy always the data.
Member

Reminder to add this to #98661 as well.

Reminder to add this to #98661 as well.

@filedescriptor are you going to commit the fix?

@filedescriptor are you going to commit the fix?

This issue was referenced by 16112ac7fd

This issue was referenced by 16112ac7fd4f2b8e66fa51345096b4fa83aa0349

This issue was referenced by 60bf561d37

This issue was referenced by 60bf561d379a108eb6d068715ff592e81717972b

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Member

Added subscriber: @GoblinInTheVoid

Added subscriber: @GoblinInTheVoid
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
6 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#98853
No description provided.