OSL: Cycles Script Node with trace call crashes Blender on render #54887
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#54887
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Windows 10 64 bit, GTX 980 Ti, rendering on i9-7900X
Blender Version
Broken:
2.75a
c27589e
2.78c
e92f235283
2.79b
f4dc9f9d68
2.79
5740505
(latest build)2.79
60f4cb2
(latest build, win32)2.80
cfa1700
(latest build)Worked:
2.70
19e627c
Short description of error
A trivial OSL Script Node in Cycles where
trace(a, b)
and thengetmessage("trace", hitdist", dist)
is called and result is passed to mix node crashes Blender withEXCEPTION_ACCESS_VIOLATION
on render. I experienced similar crashes even when trace/getmessage weren't being called, but this particular example was easiest to reproduce consistently.Exact steps for others to reproduce the error
osl-bug.blend
Open attached .blend file, switch to rendered viewport shading or hit render to instantly crash Blender.
Added subscriber: @ptim
Added subscriber: @lichtwerk
Cannot reproduce here (checked official releases 2.79, 2.79a, 2.79b, 2.78c), but I'm on linux...
Someone on Windows being able to reproduce?
Added subscriber: @ChristopherAnderssarian
Cannot reproduce on 5960x CPU with 2.79a/b on Windows 7.
Through author probably used their GTX 980 Ti.
@ChristopherAnderssarian : thx for testing.
OSL is CPU only afaik.
dufff.....
Shows I don't have experience with GPU Rendering....
The full error message is:
Whether the script works or crashes seems to depend on what its output is connected to. I tested a few different cases, I can reproduce these results 100% of the time:
Crashes:
Output of the Script node connected to Fac of MixRGB node, when Color1 != Color2. (see: the attached .blend file in original post)
Output of the Script node connected to Fac of Mix Shader node.
Output of the Script node connected to Saturation of Hue/Saturation Node.
Works:
Output of the Script node connected to Fac of MixRGB node, when Color1 == Color2. (I guess the entire node is optimized away in this case?)
Output of the Script node connected to Strength of Emission node.
Output of the Script node connected to Hue of Hue/Saturation Node.
Added subscriber: @LazyDodo
we have recently updated osl/llvm, is this still an issue? @ptim can you check with a nightly build?
Thank you, this issue seems to be resolved as of
76f640c27d
.Changed status from 'Open' to: 'Resolved'
Score! thanks for the quick test!