sccn / BCILAB

MATLAB Toolbox for Brain-Computer Interface Research
Other
195 stars 120 forks source link

Supergui and Filter Errors on Mac #34

Open jupaw opened 7 years ago

jupaw commented 7 years ago

Hi, I tried to do the BCILAB tutorials from SCCN last week (since I'll have to use it for my thesis) and encountered some errors.

I use a Mac with OS 10.12.3 with all recent updates, my MATLAB version is R2015b (8.6.0.267246). Furthermore, I've tried both the EEGLAB plugin provided with BCILAB (13_4_4_b) as well as the newest version from SCCN (14_0_0_b), and the BCILAB version from SCCN (1.1), the BCILAB version from the master branch (1.2-alpha) and the BCILAB version from the devel branch (1.4) in various combinations.

It could be important to mention that when starting BCILAB, I get a warning:

Warning: Function cummax has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict 
   In path (line 109)
   In addpath (line 88)
   In env_load_dependencies>load_dependencies (line 165)
   In env_load_dependencies (line 78)
   In env_startup (line 224)
   In bcilab (line 115) 

These are the errors: in the BCILAB versions from SCCN and from the master branch I've encountered the supergui error referenced in other issues, every time I try to define a new approach (after choosing one, before the window to specify the parameters):

Error using supergui (line 122)
supergui error: argument 'fig' must be numeric

Error in inputgui (line 161)
            [tmp tmp2 allobj] = supergui( 'fig', fig, 'minwidth', 200, 'geomhoriz',
            g.geometry, 'uilist', g.uilist, 'geomvert', [g.geomvert(:)' 1 1] );

Error in arg_guidialog (line 194)
[outs,dummy,okpressed] = inputgui('geometry',geometry,
'uilist',uilist,'helpcom',['env_doc ' helptopic],
'title',dialogtitle,'geomvert',geomvert); %#ok<ASGLU>

Error in gui_configapproach (line 37)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB:
Configure approach','Invoke',false);

Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
        [varargout{1:2}] = gui_configapproach(varargout{1},true);

Error in gui_mainfcn (line 264)
        feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
    gui_mainfcn(gui_State, varargin{:});

Error while evaluating Menu Callback

I've read that this occurs when you're using an old EEGLAB version, but I have the current one (14.0.0 from the SCCN, and the recent version in the BCILAB).

So I tried to check out the devel branch of BCILAB, and I didn't encounter the supergui error (jay!), but another error popped up when I was training the classifier (nooo!):

Error using matlab.ui.Figure/set
Invalid or deleted object.

Error in matlab.hg.internal.openfigLegacy (line 111)
                set(fig,'Visible','off');

Error in gui_mainfcn>local_openfig (line 286)
    gui_hFigure = matlab.hg.internal.openfigLegacy(name, singleton, visible);

Error in gui_mainfcn (line 158)
        gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt, gui_Visible);

Error in gui_reviewresults (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in gui_calibratemodel>pushbutton1_Callback (line 171)
    gui_reviewresults(stats); end

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_calibratemodel (line 30)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_calibratemodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);

Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>

Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);

Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);

Error in bci_predict (line 219)
    dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end

Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

beginning evaluation...
NOTE: no perfectly matching stream found; matches ordered labels: 0, matches unordered labels: 0, provides necessary labels: 1, matches channel count: 0, matches channel types: 0, provides necessary types: 0, provides necessary channel count: 1
  pipeline input labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1', 'M1', 'M2', 'VEOG'}
  using stream's labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1'}
Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);

Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>

Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);

Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);

Error in bci_predict (line 219)
    dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end

Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

beginning evaluation...
NOTE: no perfectly matching stream found; matches ordered labels: 0, matches unordered labels: 0, provides necessary labels: 1, matches channel count: 0, matches channel types: 0, provides necessary types: 0, provides necessary channel count: 1
  pipeline input labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1', 'M1', 'M2', 'VEOG'}
  using stream's labels: {'Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'CB2', 'Cz', 'Fz', 'Pz', 'T5''', 'T6''', 'O1''', 'O2''', 'P3''', 'P4''', 'Pz''', 'Oz', 'CB1'}
Error using filter
Initial conditions must be a vector of length max(length(a),length(b))-1, or an array
with the leading dimension of size max(length(a),length(b))-1 and with remaining
dimensions matching those of x.

Error in filter_fast (line 45)
        [X,Zf] = filter(B,A,X,Zi,dim);

Error in flt_fir (line 273)
            [X(range,:),state.(f{1})] = filter_fast(b,1,X(range,:),state.(f{1}),1);

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in exp_beginfun (line 428)
            parts{i} = exp_eval(parts{i},inf); %#ok<AGROW>

Error in set_makepos (line 61)
if ~exp_beginfun('filter'), return; end

Error in hlp_wrapresults (line 52)
        [a{1:len}] = f(varargin{:});

Error in exp_eval (line 131)
            varargout = hlp_wrapresults(x.head,x.parts{:});

Error in hlp_scope>@(f,a,frame__f1)feval(f,a{:})

Error in hlp_scope (line 53)
    [varargout{1:nargout}] = func(f,varargin);

Error in exp_eval_optimized (line 52)
    [varargout{1:nargout}] =
    hlp_scope({'memoize',{'memory',1,'disk',double(unpartitioned)}}, @exp_eval,x,iters);

> Error in bci_predict (line 219)
>     dataset.streams{g} = exp_eval_optimized(resolved_graph{g}); end

Error in gui_applymodel>pushbutton1_Callback (line 130)
[pred,loss,stats,targ] = bci_predict('model',model,'data',dataset,'metric',metric);
%#ok<NASGU>

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in gui_applymodel (line 42)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)gui_applymodel('pushbutton1_Call back',hObject,eventdata,guidata(hObject)) 
Error using uiwait (line 81)
Error while evaluating UIControl Callback

BCILAB told me to install xCode, after doing this the master BCI still produces the supergui error, the devel branch version produces a new one:

WARNING: The MVAR algorithm 'BSBL BO' depends on BSBL_BO.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'BSBL L1' depends on BSBL_L1_noise.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'T-MSBL' depends on TMSBL.m, which cannot be located on the path. This algorithm will not be available.
WARNING: The MVAR algorithm 'SCSA EM' depends on scsa_em.m, which cannot be located on the path. This algorithm will not be available.
Error using arg_guidialog>obtain_items (line 273)
The specified identifier (SignalProcessing.FIRFilter.Frequencies) could not be found in the function's declared
arguments.

Error in arg_guidialog (line 116)
[spec,subset] = obtain_items(rawspec,subset,'',show_guru);

Error in gui_configapproach (line 37)
result = arg_guidialog(calibrate_func,'params',approach.parameters,'title','BCILAB: Configure
approach','Invoke',false);

Error in gui_newapproach>gui_newapproach_OutputFcn (line 65)
        [varargout{1:2}] = gui_configapproach(varargout{1},true);

Error in gui_mainfcn (line 264)
        feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);

Error in gui_newapproach (line 28)
    gui_mainfcn(gui_State, varargin{:});

Error while evaluating Menu Callback 

I've tried reinstalling all plugins, resetting the default paths, restarting both MATLAB and my computer. I guess there could be an error with the dependencies on my computer, but I'm not quite sure how to solve that. Is there a solution, or do I have to switch to a Windows-PC?

Regards, Juliane

Meshael-S commented 7 years ago

Error using supergui (line 122) supergui error: argument 'fig' must be numeric ^ ^ I faced the same error with supergui and found the solution :) Change the definition of 'fig' in supergui.m form 'real' to '' i.e. empty quotes

Good luck

jupaw commented 7 years ago

Hi, thanks for your advice, it doesn't work flawlessly but I think it will be sufficient for the analysis I have in mind.