Eevee instant crash with a custom node from template example #89260

Closed
opened 2021-06-18 09:51:45 +02:00 by Pedro A. · 16 comments
Contributor

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27

Blender Version
Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: 84da05a8b8
Worked: (newest version of Blender that worked as expected)
Caused by e125305af4

Short description of error
Instant Blender crash when custom node template have defined some node with a enumerator property, and this property is named 'default_value'.
Not any problem if the property have different name, i.e. 'my_enum_prop' in the original template

Exact steps for others to reproduce the error

  • Load the attached scene
  • open script editor
  • run the current loaded script, this add a custom node entry in the node editor
  • change to node editor
  • add a custom node
  • try to render with Cycles: OK
  • try to render with Eevee: crash

[Based on the default startup or an attached .blend file (as simple as possible)]

eevee_crash.blend

I added an small video to explain. Sorry for my bad english!
eevee_crash.mp4

The blender_crash.txt generated..
blender.crash.txt

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 466.27 **Blender Version** Broken: version: 2.93.0, branch: master, commit date: 2021-06-02 11:21, hash: `84da05a8b8` Worked: (newest version of Blender that worked as expected) Caused by e125305af4 **Short description of error** Instant Blender crash when custom node template have defined some node with a enumerator property, and this property is named 'default_value'. Not any problem if the property have different name, i.e. 'my_enum_prop' in the original template **Exact steps for others to reproduce the error** - Load the attached scene - open script editor - run the current loaded script, this add a custom node entry in the node editor - change to node editor - add a custom node - try to render with Cycles: OK - try to render with Eevee: crash [Based on the default startup or an attached .blend file (as simple as possible)] [eevee_crash.blend](https://archive.blender.org/developer/F10179607/eevee_crash.blend) I added an small video to explain. Sorry for my bad english! [eevee_crash.mp4](https://archive.blender.org/developer/F10179612/eevee_crash.mp4) The blender_crash.txt generated.. [blender.crash.txt](https://archive.blender.org/developer/F10179631/blender.crash.txt)
Author
Contributor

Added subscriber: @povmaniac

Added subscriber: @povmaniac
Pedro A. changed title from Eevee instant crash whit a custom node from template example to Eevee instant crash with a custom node from template example 2021-06-18 10:01:10 +02:00
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Jeroen Bakker self-assigned this 2021-06-18 10:20:53 +02:00
Member

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

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

Issue seems to be that the node compiler handles custom sockets as floats. float sockets has a default_value attribute but is stored in a different way, hence an error occurs.

Issue seems that the socket isn't marked with SOCK_CUSTOM.

Issue seems to be that the node compiler handles custom sockets as floats. float sockets has a default_value attribute but is stored in a different way, hence an error occurs. Issue seems that the socket isn't marked with SOCK_CUSTOM.
Jeroen Bakker removed their assignment 2021-06-18 10:42:11 +02:00
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Regression: Working fine with commit on master de06cb8559. Will bisect to find the culprit shortly :)

Regression: Working fine with commit on master de06cb8559. Will bisect to find the culprit shortly :)
Member

Here is the first bad commit: e125305af4

Working fine with commit on master de06cb8559

Looks like I was wrong up here, maybe I checked that with Cycles render engine :p

Here is the first bad commit: e125305af4 >Working fine with commit on master `de06cb8559` Looks like I was wrong up here, maybe I checked that with Cycles render engine :p

Added subscriber: @ideasman42

Added subscriber: @ideasman42

The error is that an enum property is being accessed as a float which shouldn't be happening.

e125305af41a7360c52b9a38024b7e24fde06d70 changed the layout of EnumPropertyRNA so the error was hidden before this (although it would assert in debug builds).

Support for enum sockets needs to be added or at the very least - skip them to avoid crashing.

The error is that an enum property is being accessed as a float which shouldn't be happening. `e125305af41a7360c52b9a38024b7e24fde06d70` changed the layout of `EnumPropertyRNA` so the error was hidden before this (although it would assert in debug builds). Support for enum sockets needs to be added or at the very least - skip them to avoid crashing.
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
Author
Contributor

In #89260#1194020, @ideasman42 wrote:
The error is that an enum property is being accessed as a float which shouldn't be happening.

I can't understand this..
The code that I use in the attached scene is from the template examples included into Blender.
Can you explain in what part of the attached example code the enumproperty is accessed as a float ??
Best regards..
Pedro.

> In #89260#1194020, @ideasman42 wrote: > The error is that an enum property is being accessed as a float which shouldn't be happening. I can't understand this.. The code that I use in the attached scene is from the template examples included into Blender. Can you explain in what part of the attached example code the enumproperty is accessed as a float ?? Best regards.. Pedro.
Author
Contributor

In #89260#1178699, @Jeroen-Bakker wrote:
Issue seems that the socket isn't marked with SOCK_CUSTOM.

I can't understand this.. where is it supposed to be marked as SOCK_CUSTOM, in the addon part or in the core of Blender?
Thanks for any explanation.
Cheers..

> In #89260#1178699, @Jeroen-Bakker wrote: > Issue seems that the socket isn't marked with SOCK_CUSTOM. I can't understand this.. where is it supposed to be marked as SOCK_CUSTOM, in the addon part or in the core of Blender? Thanks for any explanation. Cheers..
Author
Contributor

I have investigate a bit this problem. There are the result:
A simple custom node with a enum property, called 'default_value' is enough to cause a crash, even if these node are disconnected from any node tree.
So the main question: why Eevee try to process a node, even not linked in the node tree, and created from other render engine???
The 'normal' behaviour, at least from all my addons is:

  • search for a 'output' node type
  • when is selected, the code check for any other node connected to these 'output' node.
  • if not any node connected, the search is stopped and these 'output' node is ignored.

Never, in any case, a isolated node is processed, except if is a output node type. And for more safety operation, each engine only search for they own output node types
I think Cycles does the same behavior, but why Eevee not?

The above defined policy allow create a multiple node trees into the editor, one for each engine, without issues.
imagen.png

Each engine only read your own nodes.

@ideasman42 @Jeroen-Bakker what do you think, guys? Any other clue are welcome.

I have investigate a bit this problem. There are the result: A simple custom node with a enum property, called 'default_value' is enough to cause a crash, even if these node are disconnected from any node tree. So the main question: why Eevee try to process a node, even not linked in the node tree, and created from other render engine??? The 'normal' behaviour, at least from all my addons is: - search for a 'output' node type - when is selected, the code check for any other node connected to these 'output' node. - if not any node connected, the search is stopped and these 'output' node is ignored. Never, in any case, a isolated node is processed, except if is a output node type. And for more safety operation, each engine only search for they own output node types I think Cycles does the same behavior, but why Eevee not? The above defined policy allow create a multiple node trees into the editor, one for each engine, without issues. ![imagen.png](https://archive.blender.org/developer/F10611147/imagen.png) Each engine only read your own nodes. @ideasman42 @Jeroen-Bakker what do you think, guys? Any other clue are welcome.

This issue was referenced by 419b4e0b00

This issue was referenced by 419b4e0b00c6e4191d1fd70925040e0215dd933d

This issue was referenced by a5c59fb90e

This issue was referenced by a5c59fb90ef9c3e330556703c86e720740cf2c8d
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Jeroen Bakker self-assigned this 2021-11-15 08:15:37 +01: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
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#89260
No description provided.