Short description of error
Not an error, more of a usability issue. Basically if you are new to OSL and try and set it up you will just get a black cube in your render. I tried many many things to get this to work but couldn't work it out until I found another user with exactly the same problem: https://blenderartists.org/forum/showthread.php?367841-Basics!
Turns out you need to tick the "Open Shading Language" box in the render page. "So obvious!" you might be thinking, but only if you already know it exists. Kind of a problem with 90% of Blender's interface but one thing at a time.
- Display a warning if a scene is rendered that uses OSL but has OSL disabled.
- Make a copy of the "Open Shading Language" checkbox on the nodes view. If you like it can only be visible when the current graph contain OSL nodes.
- When you add an OSL node, if OSL is disabled show a dialog "OSL is currently disabled. If can be enabled in the render controls. Enable it now? [Yes] [No] [x] Don't show again"