osl warning depends on ui #46117

Closed
opened 2015-09-15 10:58:03 +02:00 by Jacques Lucke · 5 comments
Member

System Information
Windows 7 64 bit
Nvidia Quadro 600

Blender Version
Broken: 07a7d64

Short description of error
A user of the animation nodes experienced a crash when setting the default_value of an input socket of the script node. I dived deeper into that and found a behavior that is most propably not intended to be this way. I don't know if this was the reason for the crash or not yet..
Basicly I get a warning message in the console but only under some specific circumstances that shouldn't be related. The message is "WARNING: attempting to set parameter with wrong type: Point (exepected 'point', received 'vector')"

Exact steps for others to reproduce the error

  1. Load the default scene
  2. Switch to cycles
  3. Enable "Open Shading Language" in the render settings
  4. Open the text editor and insert the "Noise" OSL template
  5. Create a new material for the cube in the node editor
  6. Insert a script node and assign the noise.osl file
  7. Make sure you are in solid mode and have the node editor open
  8. In the properties editor: Switch to the material tab
  9. In the node editor: Link the 'Perlin' output to the 'Color' input of the diffuse node

Now there should be a warning in the console.. Important to note is that this warning is ONLY there when you are in the material tab in the properties editor OR there is a layout.prop_search for the materials somewhere visible in the interface. I tested this by putting the prop_search into a custom panel. Whenever the panel was closed the warning didn't appear and the other way around.

Whenever you make a change in the node editor now the warning will be printed again.

osl warning.PNG

osl_warning.blend
When the file is open change anything you want in the node editor (eg. make a link into the empty space, or copy a node)

**System Information** Windows 7 64 bit Nvidia Quadro 600 **Blender Version** Broken: 07a7d64 **Short description of error** A user of the animation nodes experienced a crash when setting the *default_value* of an input socket of the script node. I dived deeper into that and found a behavior that is most propably not intended to be this way. I don't know if this was the reason for the crash or not yet.. Basicly I get a warning message in the console but only under some specific circumstances that shouldn't be related. The message is "WARNING: attempting to set parameter with wrong type: Point (exepected 'point', received 'vector')" **Exact steps for others to reproduce the error** 1. Load the default scene 2. Switch to cycles 3. Enable "Open Shading Language" in the render settings 4. Open the text editor and insert the "Noise" OSL template 5. Create a new material for the cube in the node editor 6. Insert a script node and assign the noise.osl file 7. Make sure you are in solid mode and have the node editor open 8. In the properties editor: Switch to the material tab 9. In the node editor: Link the 'Perlin' output to the 'Color' input of the diffuse node Now there should be a warning in the console.. Important to note is that this warning is ONLY there when you are in the material tab in the properties editor OR there is a layout.prop_search for the materials somewhere visible in the interface. I tested this by putting the prop_search into a custom panel. Whenever the panel was closed the warning didn't appear and the other way around. Whenever you make a change in the node editor now the warning will be printed again. ![osl warning.PNG](https://archive.blender.org/developer/F233397/osl_warning.PNG) [osl_warning.blend](https://archive.blender.org/developer/F233399/osl_warning.blend) When the file is open change anything you want in the node editor (eg. make a link into the empty space, or copy a node)
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

Added subscriber: @Sergey

Added subscriber: @Sergey

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sergey Sharybin self-assigned this 2015-09-24 11:51:16 +02:00

Those are just harmless warning messages. Root of the issue is that in the UI we don't separate vector, point and normal it is all just vectors, without any extra semantic. However, OSL does separate semantic, so in order to make sure all parameters are properly updated we currently asking to set same parameter with all three types and same value. Incompatible form OSL point of view values will be ignored (with the warning message printed to the console), compatible one will be used to set parameter. This causes 2 warning messages per blender's SOCK_VECTOR socket.

Surely we could try being smarter here and query actual paramter type from script itself, check if it's compatible with blender's socket type and so on.. Or support sematic meaning for SOCK_VECTOR from blender side. But all this i wouldn't consider a bug, just something which could be improved.

Also, to make it clear. This warnings are only appearing when Cycles starts to render something with that material. So if you don't have any material preview or material icon visible no rendering will happen. That explains why you only have those warnings printed in only certain UI configurations.

Crash with animating input sockets is to be narrowed down are reported separately btw.

So thanks for the report, but is' more a TODO.

Those are just harmless warning messages. Root of the issue is that in the UI we don't separate vector, point and normal it is all just vectors, without any extra semantic. However, OSL does separate semantic, so in order to make sure all parameters are properly updated we currently asking to set same parameter with all three types and same value. Incompatible form OSL point of view values will be ignored (with the warning message printed to the console), compatible one will be used to set parameter. This causes 2 warning messages per blender's SOCK_VECTOR socket. Surely we could try being smarter here and query actual paramter type from script itself, check if it's compatible with blender's socket type and so on.. Or support sematic meaning for SOCK_VECTOR from blender side. But all this i wouldn't consider a bug, just something which could be improved. Also, to make it clear. This warnings are only appearing when Cycles starts to render something with that material. So if you don't have any material preview or material icon visible no rendering will happen. That explains why you only have those warnings printed in only certain UI configurations. Crash with animating input sockets is to be narrowed down are reported separately btw. So thanks for the report, but is' more a TODO.
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
2 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#46117
No description provided.