Hi I have no error compiling, but running my project it stops before entering a function and debugging I have an error about Segmentation fault. The function:

Mat logGabor(matriz filter,Mat filter,double r_o,double theta_o,double sigma_theta, matriz radius,matriz theta,int cols,int rows,double sigma_r,int *padSize){

Mat rpad;
int k=*padSize;

printf("Welcome to the function"); //Here the error
More info: I created the matriz as : typedef double** matriz;
and a createmat function that give back a double** and in this function I allocate space for matriz and works. In the main:

Mat chr-Rpad[4][5]; //chrOrient=4;chrScales=5
for(int i_or=1;i_or<chrOrient;i_or++){
  for(int i_sc=1;i_sc<chrScales;i_sc++){
      //some math calculation