Depsgraph: Crash with COW with EEVEE viewport #55062

Closed
opened 2018-05-14 17:40:58 +02:00 by Clément Foucault · 12 comments

Step to reproduce:

0.0 Start blender with COW enabled.
0.5 Load file. crash_cow_render.blend
1.0 Switch Viewport to Rendered mode (EEVEE).
2.0 Switch the texture panel to 3D viewport.
3.0 Crash.

The new viewport does not even use EEVEE (it uses workbench by default).
It has to do with the dynamic UBO data hack referencing data from the nodetree DNA.

Step to reproduce: 0.0 Start blender with COW enabled. 0.5 Load file. [crash_cow_render.blend](https://archive.blender.org/developer/F3364749/crash_cow_render.blend) 1.0 Switch Viewport to Rendered mode (EEVEE). 2.0 Switch the texture panel to 3D viewport. 3.0 Crash. The new viewport does not even use EEVEE (it uses workbench by default). It has to do with the dynamic UBO data hack referencing data from the nodetree DNA.
Sergey Sharybin was assigned by Clément Foucault 2018-05-14 17:40:58 +02:00
Author
Member

Added subscriber: @fclem

Added subscriber: @fclem
Clément Foucault changed title from Depsgraph: Crash with COW after render in EEVEE to Depsgraph: Crash with COW with EEVEE viewport 2018-05-14 18:45:38 +02:00

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Oops, used the wrong bug number in commit.

Oops, used the wrong bug number in commit.

Added subscriber: @dfelinto

Added subscriber: @dfelinto

Reproduced in a simpler file:
cow-render-crash.blend

Just change to RENDERED mode (Shift + Z) and try to render (F12) you may need to refresh the view for it to crash.

I only get the error via QTCreator, not via command-line.

Full backtrace: running single-thread: P715

Reproduced in a simpler file: [cow-render-crash.blend](https://archive.blender.org/developer/F3544091/cow-render-crash.blend) Just change to RENDERED mode (Shift + Z) and try to render (F12) you may need to refresh the view for it to crash. I only get the error via QTCreator, not via command-line. Full backtrace: running single-thread: [P715](https://archive.blender.org/developer/P715.txt)
Sergey Sharybin was unassigned by Dalai Felinto 2018-06-02 18:30:15 +02:00
Dalai Felinto self-assigned this 2018-06-02 18:30:15 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Added subscriber: @AlexanderRomanov

Added subscriber: @AlexanderRomanov

@brecht @Sergey @fclem and @dfelinto meeting notes:

For now we force tree rebuilding for every change in the material.

  • @fclem will prevent deferred shader compilation to run for existent shaders.
  • @dfelinto will make the tree to rebuild and update UBO code to not refer to original data.

This may lead to performance decrease in animated node trees.
The next interesting steps are:

  • @AlexanderRomanov 's patch to expose the shaders to Python also make them more granular (D2577), if it doesn't help performance may lead to more compact shaders anyways and could be applied (at the least the part related to the shader code generation). I suspect the patch has both parts to mangled and is in a dire need of an update though.
  • Profile the shader generation steps and see if re-creation the shader in a production environment is an issue.
  • If it is: Port part of the re-creation of shaders to the (threaded) depsgraph. All the part related to localizing the tree, hashing and lookup could be threaded in this scenario.
  • Additionally we can revisit the idea of updating UBOs when the topology remains unchanged, instead of re-creating the shader.
@brecht @Sergey @fclem and @dfelinto meeting notes: For now we force tree rebuilding for every change in the material. - @fclem will prevent deferred shader compilation to run for existent shaders. - @dfelinto will make the tree to rebuild and update UBO code to not refer to original data. This may lead to performance decrease in animated node trees. The next interesting steps are: - @AlexanderRomanov 's patch to expose the shaders to Python also make them more granular ([D2577](https://archive.blender.org/developer/D2577)), if it doesn't help performance may lead to more compact shaders anyways and could be applied (at the least the part related to the shader code generation). I suspect the patch has both parts to mangled and is in a dire need of an update though. - Profile the shader generation steps and see if re-creation the shader in a production environment is an issue. - If it is: Port part of the re-creation of shaders to the (threaded) depsgraph. All the part related to localizing the tree, hashing and lookup could be threaded in this scenario. - Additionally we can revisit the idea of updating UBOs when the topology remains unchanged, instead of re-creating the shader.

This issue was referenced by 3126f85d26

This issue was referenced by 3126f85d26448d7e8698724a563e0f5a08f4f34f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#55062
No description provided.