# Blender crashes when enabling “true” displacement

I created an OSL shader (a 4D noise texture) and connected it to the "Displacement" output of my shader. I wanted this to be a animated micropolygon / adaptive subdivision displacement, so I enabled "Experimental" of course.

When I go to make the Displacement type "true" though, Blender consistently crashes, probably due to memory overload. I don't have an especially high vertex count, though.

How can I work around / fix this?

This video shows the problem, it's through Google Drive.

Here is the Stackexchange question that help peed me create the OSL shader

And, finally, here is the video that was guiding me through the Micropolygon Displacement process.

EDIT: Here is my OSL code.

#include "stdosl.h"

float Scale = 1.0,
float Time = 0.0,
output color Color = 0.0
)
{
Color = noise( "uperlin", P * Scale, Time );
}

• Potentially related? blender.stackexchange.com/questions/69023/… – JtheNinja May 15 '18 at 23:24
• Can you post your OSL code? – Scott Milner May 16 '18 at 0:12
• Done. Anything else that would help? – Dr. Farquaad May 17 '18 at 3:14
• Does it display an error message when you run "blender.exe --debug-memory" in the command prompt? – Michael Glen Montague May 18 '18 at 16:48
• Just tried that, and no, no error message is displayed. I can open blender fine in memory debug mode. Then, when I try to switch it to 'True' it still crashes. So, probably not a memory leak. – Dr. Farquaad May 19 '18 at 16:49

Further to this, it appears to be specific to the type of noise used. For example, changing using 'usimplex' instead of 'uperlin' does not trigger the issue - also fine for 'cell', 'simplex', 'perlin' (without the 'u'), 'gabor', etc. all seem to work fine but for some reason 'uperlin' causes the crash - but only if you actually try to 'use' one of the elements of the color (eg, color c = noise('uperlin’, P*Scale, Time); Displacement = c[0]; causes it to crash).