Q:

vtkArrayCalculator - Segmentation fault when accessing the output

I want to use vtkArrayCalculator, for use in a Paraview filter, as described here: ArrayCalculatorExample
vtkSmartPointer<vtkArrayCalculator> calculator = vtkSmartPointer<vtkArrayCalculator>::New();
calculator->SetInputData(input);
calculator->AddScalarArrayName("u");
calculator->SetFunction("u+1");
calculator->SetResultArrayName("wind_velocity");
calculator->Update();
vtkSmartPointer<vtkFloatArray> windVelocity = 
        vtkFloatArray::SafeDownCast(calculator->GetStructuredGridOutput()->GetPointData()->GetArray("wind_velocity"));

Now when I want to access the data with (or similar commands)
    windVelocity->GetValue(0);

I get a "Segmentation fault (core dumped)".
"input" is a vtkStructuredGrid and "u" is a vtkDataArray (that can be downcast to a vtkFloatArray without problem). "u" can be accessed by 
input->GetPointData()->GetArray("u");

Every hint to what I am doing wrong is greatly appreciated!
Edit: I already tried the following
vtkSmartPointer<vtkFloatArray> windVelocity = vtkSmartPointer<vtkFloatArray>::New();
windVelocity->DeepCopy(vtkFloatArray::SafeDownCast(calculator->GetStructuredGridOutput()->GetPointData()->GetArray("wind_velocity")));

A:

I'd suggest to split up the long chain of vtkFloatArray::SafeDownCast(calculator->GetStructuredGridOutput()->GetPointData()->GetArray("wind_velocity")) and use a debugger to see what the intermediate results are. 
When reading the definition of GetArray, it states that under various conditions the function might return NULL. Check the return value of GetArray; it is very likely that you do not get back what you expect.

vtkDataArray* vtkFieldData::GetArray  (   const char *    arrayName   )
  inline
Not recommended for use. Use GetAbstractArray(const char *arrayName) instead.
Return the array with the name given. Returns NULL if array not found.
  A NULL is also returned if the array with the given name is not a
  vtkDataArray. To access vtkStringArray, vtkUnicodeStringArray, or
  vtkVariantArray, use GetAbstractArray(const char *arrayName).

