MATLAB Answers

Problem with GUIDE based app and R2015a

8 ビュー (過去 30 日間)
Joseph Areeda
Joseph Areeda 2015 年 6 月 1 日
コメント済み: Walter Roberson 2015 年 9 月 4 日
We have a GUIDE based application that required some work to get functional again with 2014b. Now with 2015a I'm getting the errors below on startup in the main GUIDE function. If I try to open the .fig file it hangs with most but not all of the [complex] dialog displayed. I've searched but can't find anything relevant.
The error message is
Undefined variable "matlab" or class "matlab.settings.Group".
Error in settings (line 35)
group = matlab.settings.Group(s, 'session');
Error in ligoDV_ligoDV_OpeningFcn (line 79)
setappdata(handles.main, 'settings', settings);
Error in gui_mainfcn (line 220)
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in ligoDV (line 45)
gui_mainfcn(gui_State, varargin{:});
Error in ligoDV_start (line 164)
ligoDV is the name of the app.
Any clues on how to figure this out would be greatly appreciated.

  0 件のコメント

Sign in to comment.


Dene Farrell
Dene Farrell 2015 年 9 月 2 日
Change the variable "settings" to another name such as "joes_settings".

  2 件のコメント

Joseph Areeda
Joseph Areeda 2015 年 9 月 3 日
I did get this same answer from technical support. I should have posted it here.
This program has been working since 2006 and there were over 150 references to "settings"
Let's just say I'm not a big fan of making new reserved words that are in the dictionary. However it is working after changing the name of that cell array.
Walter Roberson
Walter Roberson 2015 年 9 月 4 日
I would look at that traceback as implying that a routine named "settings" has been called with no arguments when you expected "settings" to be a variable. That would not make "settings" reserved, but it would call for an investigation of why it was not noticed that it was a variable. Is there a load() shortly before that which is "poofing settings into existence" ?

Sign in to comment.

その他の回答 (2 件)

Vinod Sudheesh
Vinod Sudheesh 2015 年 6 月 8 日
Hi Joseph,
How are you launching your MATLAB App?. Are you observing this error even when launching the App from the command line by executing the following command?

  2 件のコメント

Joseph Areeda
Joseph Areeda 2015 年 6 月 8 日
Hi Vinod, There is a script called ligoDV_start that runs before that one.
I've tried it from an installed application and by running the script from the source directory used to create the app.
To be clear, I've tried running the installed app on multiple systems (Linux, Mac, Windows) and if I'm running R2014b it works, with R2015a it does not, using the same installed app.
Reinstalling the app with 15a did not change anything.
Walter Roberson
Walter Roberson 2015 年 6 月 8 日
I have not see a "matlab.settings.Group" before. Could we see the couple of lines before that?

Sign in to comment.

Image Analyst
Image Analyst 2015 年 9 月 3 日
You forgot to attach the m-file, or even the openingFcn() function. Why do you think you should have a structure or class called matlab? I don't. Most likely you created it somehow, like by running some lines of code in your startup.m file or somewhere and this code expected it to be in the local workspace somehow. If you put the cursor in matlab and type control-D, does it send you anywhere (probably not)?
Go to your old installation that works, and run the Dependency Report on your code and see where this "matlab" comes from. Then bring that file over to your new installation.

  1 件のコメント

Joseph Areeda
Joseph Areeda 2015 年 9 月 4 日
Thanks for your reply. As stated above, after communicating with Tech Support, it turns out settings is part of Matlab (as of 2015a) and cannot be used as a variable in user space. Renaming it (in all 150+ places) solved the problem.
I have yet to find documentation that explains this or lists new reserved words.

Sign in to comment.

Translated by