Note that there are some explanatory texts on larger screens.

plurals
  1. POempty MEX file Crashes
    primarykey
    data
    text
    <p>i am trying to run a mex file i created and compiled. However, the program crashes when i attempt to use that mex file with the message:</p> <pre><code>Program received signal SIGSEGV, Segmentation fault. 0x0000000000000001 in ?? () </code></pre> <p>In order to attempt and debug the problem, i cleared the file completly, leaving only:</p> <pre><code>#include "mex.h" #include "lsm_fast_marching_method.h" /* Input Arguments */ #define PHI (prhs[0]) #define BACKGROUND (prhs[1]) /* Output Arguments */ #define SKELETON (plhs[0]) void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { return; } </code></pre> <p>Header file contents:</p> <pre><code>#ifndef included_fast_marching_method_h #define included_fast_marching_method_h #ifdef __cplusplus extern "C" { #endif int computeExtensionFields2d( double *distance_function, double **extension_fields, double *phi, double *mark, double **source_fields, int num_extension_fields, int spatial_derivative_order, int *grid_dims, double *dx); int computeExtensionFields2d_WithMaxVal( double *distance_function, double **extension_fields, double *phi, double *mark, double **source_fields, int num_extension_fields, int spatial_derivative_order, int *grid_dims, double *dx, double max_value); int computeDistanceFunction2d( double *distance_function, double *phi, double *mark, int spatial_derivative_order, int *grid_dims, double *dx); int solveEikonalEquation2d( double *phi, double *speed, double *mask, int spatial_derivative_order, int *grid_dims, double *dx); int computeExtensionFields3d( double *distance_function, double **extension_fields, double *phi, double *mask, double **source_fields, int num_extension_fields, int spatial_derivative_order, int *grid_dims, double *dx); int computeDistanceFunction3d( double *distance_function, double *phi, double *mask, int spatial_derivative_order, int *grid_dims, double *dx); int solveEikonalEquation3d( double *phi, double *speed, double *mask, int spatial_derivative_order, int *grid_dims, double *dx); int doHomotopicThinning( double *thinned_img, double *phi, double *background, int *grid_dims); bool isSimplePoint(int* grid_point_status, double* background, int* grid_idx, int neighbors[][3], int* grid_dims); #ifdef __cplusplus } #endif #endif </code></pre> <p>But the program still crashes with the same error!! I tried running it at a debugger outside Matlab (GDB) and it still crashes with the same message..</p> <p>I am using a linux 64bit system.</p> <p>Any idea as to how this is happening? </p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload