I want to compute the temperature gradient in different solid zones of the domain. I found that the macro C_T_G can perform this task but I did not manage to get it working. Fluent always gives the same error: "Segmentation Violation"

Why ? How to solve this issue ?

I have looked here and there on the internet and I found many people who have the same problem, but I couldnt find any solution. Is it possible that there is a problem with the macro C_T_G itselft ?

Here is my code (which is basically the same as in the UDF guide of Fluent):