unfold icon indicating copy to clipboard operation
unfold copied to clipboard

MATLAB crashing during uf_glmfit when glmnet method is used

Open anikokusztor opened this issue 5 years ago • 5 comments

MATLAB version: R2017b

I have encounter a fatal error when running uf_glmfit with glmnet method. E.g. EEG= uf_glmfit(EEG,'method','glmnet');

The error message referred to Access Violation, and the error was detected when a MEX file was running: Stack Trace (from fault): [1] **\MATLAB\unfold-master\lib\glmnet_matlab\glmnetMex.mexw64+00006620 MEXFUNCTION+00002524

@behinger correctly suggested that the problem may originate from a compiler error and provided the following link (https://web.stanford.edu/~hastie/glmnet_matlab/win64compile.html) to recompile the glmnet toolbox.

I have found an alternative solution by downloading a MATLAB add-on named MATLAB Support for MinGW-w64 C/C++ Compiler. https://se.mathworks.com/matlabcentral/fileexchange/52848-matlab-support-for-mingw-w64-c-c-compiler

After installing the add-on, the error no longer occurred and the model fitting worked well.

anikokusztor avatar Nov 19 '18 14:11 anikokusztor