Regression: GPU subdivision crash when switched to edit mode #98813

Closed
opened 2022-06-12 09:14:59 +02:00 by Blahoslav Fajmon · 43 comments

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: Intel(R) UHD Graphics 620 Intel 4.5.0 - Build 27.20.100.9664

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

Crash caused by 0609b4bb49

Short description of error
Crash when switched to edit mode with cylinder subdivision modifier

Exact steps for others to reproduce the error

  • Open attached .blend file
  • Enable GPU subdivision
  • Select Cylinder.001
  • Switch to edit mode

Test File:
kobliha.blend

**System Information** Operating system: Windows-10-10.0.19043-SP0 64 Bits Graphics card: Intel(R) UHD Graphics 620 Intel 4.5.0 - Build 27.20.100.9664 **Blender Version** Broken: version: 3.2.0, branch: master, commit date: 2022-06-08 10:22, hash: `e05e1e3691` Crash caused by 0609b4bb49 **Short description of error** Crash when switched to edit mode with cylinder subdivision modifier **Exact steps for others to reproduce the error** - Open attached .blend file - Enable GPU subdivision - Select `Cylinder.001` - Switch to edit mode Test File: [kobliha.blend](https://archive.blender.org/developer/F13149588/kobliha.blend)

Added subscriber: @Blahoslav-Fajmon

Added subscriber: @Blahoslav-Fajmon

#99911 was marked as duplicate of this issue

#99911 was marked as duplicate of this issue

#99901 was marked as duplicate of this issue

#99901 was marked as duplicate of this issue

#99645 was marked as duplicate of this issue

#99645 was marked as duplicate of this issue

#99537 was marked as duplicate of this issue

#99537 was marked as duplicate of this issue

#99538 was marked as duplicate of this issue

#99538 was marked as duplicate of this issue

#99506 was marked as duplicate of this issue

#99506 was marked as duplicate of this issue

#99227 was marked as duplicate of this issue

#99227 was marked as duplicate of this issue

#99074 was marked as duplicate of this issue

#99074 was marked as duplicate of this issue

#99012 was marked as duplicate of this issue

#99012 was marked as duplicate of this issue

#99011 was marked as duplicate of this issue

#99011 was marked as duplicate of this issue

#98964 was marked as duplicate of this issue

#98964 was marked as duplicate of this issue

#98963 was marked as duplicate of this issue

#98963 was marked as duplicate of this issue

#98872 was marked as duplicate of this issue

#98872 was marked as duplicate of this issue
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

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

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

Thanks for the report. I can repro crash locally in 3.2, 3.3.
Doesn't crash in 3.1 so definitely a regression.
Will do the git bisect

Thanks for the report. I can repro crash locally in 3.2, 3.3. Doesn't crash in 3.1 so definitely a regression. Will do the `git bisect`
Pratik Borhade changed title from Crash - edit mode + subdivision to Regression: GPU subdivision crash when switched to edit mode 2022-06-13 07:46:19 +02:00
Member

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich
Member

Crash seems to occur only when object data is shared with other.
In attached file, object's data is shared with GN tree of Poleva object. Removing that from node tree also solves the issue
cc @kevindietrich

Crash seems to occur only when object data is shared with other. In attached file, object's data is shared with GN tree of `Poleva` object. Removing that from node tree also solves the issue cc @kevindietrich
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

Crash caused by 0609b4bb49
@brecht ^

Crash caused by 0609b4bb49 @brecht ^

The problem is that Cylinder.001 is being instanced by geometry nodes. Or rather, its evaluated mesh is being instanced, and the object used for rendering is the Poleva, not Cylinder.001. Then in the draw manager it tries to find the subdivision modifier on the Poleva object, but it's not there.

This problem predates my fix, but would show the object without subdivision instead of crashing.

The problem is that `Cylinder.001` is being instanced by geometry nodes. Or rather, its evaluated mesh is being instanced, and the object used for rendering is the `Poleva`, not `Cylinder.001`. Then in the draw manager it tries to find the subdivision modifier on the `Poleva` object, but it's not there. This problem predates my fix, but would show the object without subdivision instead of crashing.

This issue was referenced by a8c92331cb

This issue was referenced by a8c92331cb0b0eb99ecc2d502996be5e2dbc0adb

This issue was referenced by ca9d65cc97

This issue was referenced by ca9d65cc97ba8e872a0ef456e51dacadd06e237e
Member

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly
Member

Isn't the idea to cache the subdivision level and any other relevant information from the modifier when creating the subdivision surface wrapper mesh? In that case the drawing code shouldn't need to search for a modifier on the mesh, all the information should already be accessible.

Isn't the idea to cache the subdivision level and any other relevant information from the modifier when creating the subdivision surface wrapper mesh? In that case the drawing code shouldn't need to search for a modifier on the mesh, all the information should already be accessible.

The Subdiv struct, containing the subdivision data structures from OpenSubdiv among other things is cached in the modifier. Maybe it could be moved to the mesh runtime without complicating the modifier code.

The `Subdiv` struct, containing the subdivision data structures from OpenSubdiv among other things is cached in the modifier. Maybe it could be moved to the mesh runtime without complicating the modifier code.

I'm working on a fix...

I'm working on a fix...
Member

Added subscriber: @GloombyBoy

Added subscriber: @GloombyBoy

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Brecht Van Lommel self-assigned this 2022-06-14 14:59:55 +02:00

Added subscribers: @razorshark566, @deadpin

Added subscribers: @razorshark566, @deadpin

Added subscriber: @JBogey

Added subscriber: @JBogey

Added subscriber: @chamakits

Added subscriber: @chamakits
Member

Added subscriber: @jafarmshodik

Added subscriber: @jafarmshodik

Removed subscriber: @GloombyBoy

Removed subscriber: @GloombyBoy

Added subscriber: @ColumnaeV

Added subscriber: @ColumnaeV

Added subscriber: @CountChocula95

Added subscriber: @CountChocula95

Added subscriber: @Tiffa

Added subscriber: @Tiffa
Member

Added subscriber: @b4hire

Added subscriber: @b4hire
Member

Added subscriber: @kevsowul

Added subscriber: @kevsowul
Member

Added subscriber: @jawhawk

Added subscriber: @jawhawk
Member

Added subscribers: @kawkoo, @OmarEmaraDev

Added subscribers: @kawkoo, @OmarEmaraDev
Member

Added subscriber: @IsabellaHH

Added subscriber: @IsabellaHH
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
9 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#98813
No description provided.