Accessing curve points positions, in draw_handler + geo node mod == huge lag. #116763

Open
opened 2024-01-03 21:23:33 +01:00 by Jose Conseco · 7 comments

System Information
Operating system: Linux-6.6.8-2-MANJARO-x86_64-with-glibc2.38 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 545.29.06

Blender Version
Broken: version: 3.6.7, branch: blender-v3.6-release, commit date: 2023-12-11 16:28, hash: cbd81f283d58
Worked: it never worked, and it does not work in blender 4.0.2 to.

Short description of error
Im using gpu module, to draw each curve point index. It works ok (fast), but as soon as we add any geo nodes modifier, to curve, moving points give huge lag (it can crash from time to time to, especially if just went edit mode, and try to move first point).
As far as my test go, this only affect new hair curves. No issues with meshes, or old curves.

Exact steps for others to reproduce the error

  1. Run script from attached file curve_drawing_slow_b367.blend
  2. Try to move curve point in edit mode - points lags a lot, they are stuck in their position.
    Disable geonodes modifier - its fast again.
**System Information** Operating system: Linux-6.6.8-2-MANJARO-x86_64-with-glibc2.38 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 545.29.06 **Blender Version** Broken: version: 3.6.7, branch: blender-v3.6-release, commit date: 2023-12-11 16:28, hash: `cbd81f283d58` Worked: it never worked, and it does not work in blender 4.0.2 to. **Short description of error** Im using gpu module, to draw each curve point index. It works ok (fast), but as soon as we add any geo nodes modifier, to curve, moving points give huge lag (it can crash from time to time to, especially if just went edit mode, and try to move first point). As far as my test go, this only affect new hair curves. No issues with meshes, or old curves. **Exact steps for others to reproduce the error** 1. Run script from attached file [curve_drawing_slow_b367.blend](/attachments/2be857b3-dadd-416c-8034-c6c5a62680d5) 2. Try to move curve point in edit mode - points lags a lot, they are stuck in their position. Disable geonodes modifier - its fast again.
Jose Conseco added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-01-03 21:23:33 +01:00

Can't confirm crash in in debug, but lags is here.

Can't confirm crash in in debug, but lags is here.
Author

Well yes, the crashes are bit random. It does not happen 90% of time.

Well yes, the crashes are bit random. It does not happen 90% of time.

it seems even disabling the modifier sometimes it lags. for me in 4.0.1, after running the script, moving a point around a lot will cause it to "freeze" and stop moving.

it seems even disabling the modifier sometimes it lags. for me in 4.0.1, after running the script, moving a point around a lot will cause it to "freeze" and stop moving.

confirmed, lags and random crash.

confirmed, lags and random crash.

Tested, random crashes, editing is laggy and sticky.

Tested, random crashes, editing is laggy and sticky.
Member

This is a use after free. I didn't look into it for too long, but I think it's a design issue with the transform system which is holding onto pointers into the position custom data layer for too long. The layer is being reallocated on each update as we retrieve it for write access and it's shared somewhere else. Ideally the transform system would retrieve the layer just before writing back the data.

This is a use after free. I didn't look into it for too long, but I think it's a design issue with the transform system which is holding onto pointers into the position custom data layer for too long. The layer is being reallocated on each update as we retrieve it for write access and it's shared somewhere else. Ideally the transform system would retrieve the layer just before writing back the data.

same issue here, lag and crashes while editing

same issue here, lag and crashes while editing
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#116763
No description provided.