Crash if shader compilation fails #80168

Closed
opened 2020-08-27 20:53:23 +02:00 by Georg K · 13 comments

System Information
Operating system: Linux-5.4.58-1-MANJARO-x86_64-with-glibc2.29 64 Bits
Graphics card: AMD VERDE (DRM 2.50.0, 5.4.58-1-MANJARO, LLVM 10.0.1) X.Org 4.5 (Core Profile) Mesa 20.1.5

Blender Version
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-27 17:52, hash: e74a24f0bb
Worked: 2.83.4
Caused by 2e630297af: GPUShader: Fix linking working even if one shader compilation failed

Short description of error
clicking on emission shader node crashes blender.
Sometimes the cube turns blue or stays black when connecting the node, then it will crash, sometimes it becomes purple, then it does not crash.

Exact steps for others to reproduce the error
In the attached file nodecrash.blend,
move the emission shader node between the gradient node and the principled shader node so the connection is: Gradient Texture >> Emission shader >> principled shader
click the emission node
crash

**System Information** Operating system: Linux-5.4.58-1-MANJARO-x86_64-with-glibc2.29 64 Bits Graphics card: AMD VERDE (DRM 2.50.0, 5.4.58-1-MANJARO, LLVM 10.0.1) X.Org 4.5 (Core Profile) Mesa 20.1.5 **Blender Version** Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-08-27 17:52, hash: `e74a24f0bb` Worked: 2.83.4 Caused by 2e630297af: GPUShader: Fix linking working even if one shader compilation failed **Short description of error** clicking on emission shader node crashes blender. Sometimes the cube turns blue or stays black when connecting the node, then it will crash, sometimes it becomes purple, then it does not crash. **Exact steps for others to reproduce the error** In the attached file [nodecrash.blend](https://archive.blender.org/developer/F8815819/nodecrash.blend), move the emission shader node between the gradient node and the principled shader node so the connection is: Gradient Texture >> Emission shader >> principled shader click the emission node crash
Author

Added subscriber: @georgK

Added subscriber: @georgK

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Moving emmision node over and over eventualy caused crash but it was immediate. I had also node wrangler addon enabled, because I was triaging another report. After disabling addon I could not reproduce bug anymore.

Can you click on File > Defaults > Load Factory Settings, load provided file and check if bug is still there?

Moving emmision node over and over eventualy caused crash but it was immediate. I had also node wrangler addon enabled, because I was triaging another report. After disabling addon I could not reproduce bug anymore. Can you click on File > Defaults > Load Factory Settings, load provided file and check if bug is still there?
Author

Still crashed, but took 3 clicks. Terminal output:

Shader Compilation Log : GPU_material_compile

10655 |   node_bsdf_principled_dielectric(, unf41, unf42, unf43, unf44, unf45, unf46, unf47, unf48, unf49, unf50, unf51, unf52, unf53, unf54, unf55, unf56, unf57, unf58, tmp37, tmp38, cons61, viewposition, cons63, cons64, tmp39, tmp66);
      |                                   ^
      | Error : syntax error, unexpected ',', expecting ')'


Writing: /tmp/nodecrash.crash.txt
Segmentation fault (core dumped)

Backtrace:

# Blender 2.91.0, Commit date: 2020-08-27 17:52, Hash e74a24f0bbf3
bpy.ops.node.select(wait_to_deselect_others=True, mouse_x=644, mouse_y=388, extend=False, deselect_all=True)  # Operator

# backtrace
./blender(BLI_system_backtrace+0x33) [0x3f28073]
./blender() [0xb6fb0e]
/usr/lib/libc.so.6(+0x3c3e0) [0x7f5017abf3e0]
./blender(_ZN7blender3gpu6ShaderD1Ev+0x1a) [0x3e2751a]
./blender(_ZN7blender3gpu8GLShaderD0Ev+0x9) [0x3e31d39]
./blender(GPU_shader_create_ex+0x4dd) [0x3e2860d]
./blender(GPU_shader_create+0x12) [0x3e28712]
./blender(GPU_pass_compile+0x40) [0x3e1aa60]
./blender(GPU_material_compile+0x14) [0x3e221e4]
./blender() [0xf72875]
./blender() [0xe38ae2]
/usr/lib/libpthread.so.0(+0x9422) [0x7f501f0bc422]
/usr/lib/libc.so.6(clone+0x43) [0x7f5017b82bf3]

# Python backtrace

Still crashed, but took 3 clicks. Terminal output: ``` Shader Compilation Log : GPU_material_compile 10655 | node_bsdf_principled_dielectric(, unf41, unf42, unf43, unf44, unf45, unf46, unf47, unf48, unf49, unf50, unf51, unf52, unf53, unf54, unf55, unf56, unf57, unf58, tmp37, tmp38, cons61, viewposition, cons63, cons64, tmp39, tmp66); | ^ | Error : syntax error, unexpected ',', expecting ')' Writing: /tmp/nodecrash.crash.txt Segmentation fault (core dumped) ``` Backtrace: ``` # Blender 2.91.0, Commit date: 2020-08-27 17:52, Hash e74a24f0bbf3 bpy.ops.node.select(wait_to_deselect_others=True, mouse_x=644, mouse_y=388, extend=False, deselect_all=True) # Operator # backtrace ./blender(BLI_system_backtrace+0x33) [0x3f28073] ./blender() [0xb6fb0e] /usr/lib/libc.so.6(+0x3c3e0) [0x7f5017abf3e0] ./blender(_ZN7blender3gpu6ShaderD1Ev+0x1a) [0x3e2751a] ./blender(_ZN7blender3gpu8GLShaderD0Ev+0x9) [0x3e31d39] ./blender(GPU_shader_create_ex+0x4dd) [0x3e2860d] ./blender(GPU_shader_create+0x12) [0x3e28712] ./blender(GPU_pass_compile+0x40) [0x3e1aa60] ./blender(GPU_material_compile+0x14) [0x3e221e4] ./blender() [0xf72875] ./blender() [0xe38ae2] /usr/lib/libpthread.so.0(+0x9422) [0x7f501f0bc422] /usr/lib/libc.so.6(clone+0x43) [0x7f5017b82bf3] # Python backtrace ```
Member

Changed status from 'Needs User Info' to: 'Confirmed'

Changed status from 'Needs User Info' to: 'Confirmed'
Member

Added subscribers: @fclem, @lichtwerk

Added subscribers: @fclem, @lichtwerk
Member

Caused by 2e630297af

@fclem: are we supposed to crash if Shader finalizing fails?

Caused by 2e630297af @fclem: are we supposed to crash if Shader finalizing fails?
Philipp Oeser changed title from Crash clicking on emission shader node to Crash if shader compilation fails 2020-08-28 11:15:22 +02:00
Member

Added subscriber: @Jeroen-Bakker

Added subscriber: @Jeroen-Bakker
Member
Hmmm I might solve this issue in [D8740: GPU: Fix Segmentation Fault Freeing Failed Shader](https://archive.blender.org/developer/D8740)
Jeroen Bakker self-assigned this 2020-08-28 11:44:15 +02:00

This issue was referenced by c284326809

This issue was referenced by c28432680971f54ebe95cc953606a3a4d3bc5c7c
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'

This issue was referenced by 5db5ac611a

This issue was referenced by 5db5ac611a5cc2645d4c8638c640bc1c2372a6bd
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
5 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#80168
No description provided.