Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Guide errors creating a simple gui

Subject: Guide errors creating a simple gui

From: Michael Born

Date: 4 Jun, 2008 12:24:02

Message: 1 of 8

Hello Matlab users,

I created a simple gui (test.fig) with help of GUIDE. To get
familiar with matlab I tried to play around with the test.m
file that was made by GUIDE.
I removed the % in front of uiwait() and put it back there
afterwards. To see what changed I pressed the green triangle
(run button) of the matlab editor and got error messages
even after changing test.m back to its original state.
Then I removed the test.m file to get a new one created by
GUIDE when opening test.fig. But now GUIDE refuses to even
open the test.fig with the error messages below.

I suspect the errors come from my java version or are a
matlab bug.
But I dont know how to check what java version matlab uses
on my Suse Linux 10.2 64bit computer.

I hope somebody can help me.
regards
Michael


The error messages:
-------------------

??? Error using ==> subsindex
Function 'subsindex' is not defined for values of class
'function_handle'.

Error in ==> cellstr at 28
            c{i} = deblank(s(i,:));

Error in ==> errordlg at 47
    ErrorString = cellstr(ErrorStringIn);

Error in ==> guidefunc>showErrorDialog at 3781
h = errordlg(message, title);

Error in ==> guidefunc at 152
    showErrorDialog('Unhandled internal error in guidefunc');

Error in ==> guide at 132
    result = LayoutEditor.openLayoutEditor(filename);

Error in ==> guidetemplate>processDialogResult at 172
                guide(destfigfile);

Error in ==> guidetemplate>dialogCallback at 91
                processDialogResult(quickstartpanel);

com.mathworks.jmi.MatlabException: Error using ==> subsindex
Function 'subsindex' is not defined for values of class
'function_handle'.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
Method)
at
com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
at
com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
at
com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:226)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
at
com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:678)
at
com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1884)
at
com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1847)

Subject: Guide errors creating a simple gui

From: Aranaga

Date: 22 Jul, 2008 15:26:02

Message: 2 of 8

I have the same problem, how could I solve?

Subject: Guide errors creating a simple gui

From: Michael Born

Date: 23 Jul, 2008 08:53:03

Message: 3 of 8

"Aranaga " <jistrah@hotmail.com> wrote in message
<g64u6a$psq$1@fred.mathworks.com>...
> I have the same problem, how could I solve?

I could not fix the problem.
I used my code without a gui. And had no time to look at the
problem since then.

Sorry.
Michael

Subject: Guide errors creating a simple gui

From: Diego Torquemada

Date: 8 Aug, 2008 12:32:53

Message: 4 of 8

same problem here...

It seems that sometimes guide saves wrongly the GUI. I am
trying to open my GUI an the following erro appears, even
after closing-opening MATLAB...

I am also using Opensuse 10.2

>> guide main_menu
??? Index exceeds matrix dimensions.

Error in ==> dialog at 85
hDialog = figure('BackingStore' ,backstore , ...

Error in ==> msgbox at 223
    figureHandle=dialog( ...

Error in ==> errordlg at 60
handle = msgbox(ErrorStringCell,DlgName,'error',Replace);

Error in ==> guidefunc>showErrorDialog at 3781
h = errordlg(message, title);

Error in ==> guidefunc at 152
    showErrorDialog('Unhandled internal error in guidefunc');

Error in ==> guide at 132
    result = LayoutEditor.openLayoutEditor(filename);

Error in ==> guidefunc>openFigure at 2523
    guide(selectfile);

Error in ==> guidefunc at 93
            varargout = openFigure(varargin{:});

com.mathworks.jmi.MatlabException: Index exceeds matrix
dimensions.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
Method)
at
com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
at
com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
at
com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:226)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
at
com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:678)
at
com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1884)
at
com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1847)
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
Method)
at
com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
at
com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
at
com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
at
com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
at
com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:352)

Subject: Guide errors creating a simple gui

From: Naor Movshovitz

Date: 6 Nov, 2008 02:24:02

Message: 5 of 8

Similar problem, with WinXp64 r2008a. Guide crashes my MATLAB session and in the process corrupted the fig file so that now my GUI can't be loaded.
Pretty bummed right now, laying out the buttons is not something i want to do twice...

"Diego Torquemada" <diegotorquemada@yahoo.com> wrote in message <g7hedl$k3j$1@fred.mathworks.com>...
> same problem here...
>
> It seems that sometimes guide saves wrongly the GUI. I am
> trying to open my GUI an the following erro appears, even
> after closing-opening MATLAB...
>
> I am also using Opensuse 10.2
>
> >> guide main_menu
> ??? Index exceeds matrix dimensions.
>
> Error in ==> dialog at 85
> hDialog = figure('BackingStore' ,backstore , ...
>
> Error in ==> msgbox at 223
> figureHandle=dialog( ...
>
> Error in ==> errordlg at 60
> handle = msgbox(ErrorStringCell,DlgName,'error',Replace);
>
> Error in ==> guidefunc>showErrorDialog at 3781
> h = errordlg(message, title);
>
> Error in ==> guidefunc at 152
> showErrorDialog('Unhandled internal error in guidefunc');
>
> Error in ==> guide at 132
> result = LayoutEditor.openLayoutEditor(filename);
>
> Error in ==> guidefunc>openFigure at 2523
> guide(selectfile);
>
> Error in ==> guidefunc at 93
> varargout = openFigure(varargin{:});
>
> com.mathworks.jmi.MatlabException: Index exceeds matrix
> dimensions.
> at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
> Method)
> at
> com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
> at
> com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
> at
> com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
> at
> com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
> at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
> at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:226)
> at
> com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
> at
> com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
> at
> com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:678)
> at
> com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1884)
> at
> com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1847)
> at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
> Method)
> at
> com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
> at
> com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
> at
> com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
> at
> com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
> at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
> at
> com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:352)
>
>

Subject: Guide errors creating a simple gui

From: Dave Brackett

Date: 6 Nov, 2008 10:42:01

Message: 6 of 8

"Naor Movshovitz" <nmovshov@gmail.com> wrote in message <getkg2$1tt$1@fred.mathworks.com>...
> Similar problem, with WinXp64 r2008a. Guide crashes my MATLAB session and in the process corrupted the fig file so that now my GUI can't be loaded.
> Pretty bummed right now, laying out the buttons is not something i want to do twice...
>
> "Diego Torquemada" <diegotorquemada@yahoo.com> wrote in message <g7hedl$k3j$1@fred.mathworks.com>...
> > same problem here...
> >
> > It seems that sometimes guide saves wrongly the GUI. I am
> > trying to open my GUI an the following erro appears, even
> > after closing-opening MATLAB...
> >
> > I am also using Opensuse 10.2
> >
> > >> guide main_menu
> > ??? Index exceeds matrix dimensions.
> >
> > Error in ==> dialog at 85
> > hDialog = figure('BackingStore' ,backstore , ...
> >
> > Error in ==> msgbox at 223
> > figureHandle=dialog( ...
> >
> > Error in ==> errordlg at 60
> > handle = msgbox(ErrorStringCell,DlgName,'error',Replace);
> >
> > Error in ==> guidefunc>showErrorDialog at 3781
> > h = errordlg(message, title);
> >
> > Error in ==> guidefunc at 152
> > showErrorDialog('Unhandled internal error in guidefunc');
> >
> > Error in ==> guide at 132
> > result = LayoutEditor.openLayoutEditor(filename);
> >
> > Error in ==> guidefunc>openFigure at 2523
> > guide(selectfile);
> >
> > Error in ==> guidefunc at 93
> > varargout = openFigure(varargin{:});
> >
> > com.mathworks.jmi.MatlabException: Index exceeds matrix
> > dimensions.
> > at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
> > Method)
> > at
> > com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
> > at
> > com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
> > at
> > com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
> > at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
> > at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
> > at
> > com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
> > at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
> > at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:226)
> > at
> > com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
> > at
> > com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
> > at
> > com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:678)
> > at
> > com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1884)
> > at
> > com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1847)
> > at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native
> > Method)
> > at
> > com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
> > at
> > com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
> > at
> > com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
> > at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
> > at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
> > at
> > com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
> > at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
> > at
> > com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:352)
> >
> >


I have had similar woes and found the only way was to recreate the gui figure again. I now make regular backups.

I have found that it seems to occur when I change something in the property inspector to something apparently unallowable. For example, I think that changing a slider name to a number (in my case a negative number) caused this error. Haven't tried again to test repeatability of this so it may have been a one off.

Subject: Guide errors creating a simple gui

From: justin

Date: 10 Nov, 2008 23:54:01

Message: 7 of 8

This bug was fixed in 2008b, but had a work around for earlier versions, not sure that it is what you are looking for, but it seems like it could help:

'System error resulting in a corrupted FIG-file when building a GUI in GUIDE' http://www.mathworks.com/support/bugreports/details.html?rp=452282

Subject: Guide errors creating a simple gui

From: Naor Movshovitz

Date: 11 Nov, 2008 00:14:02

Message: 8 of 8

It seems like this is exactly what I was looking for. Since this problem occurs sporadically only time will tell if the solution worked, but I am hopeful. Thanks!
-n
"Justin " <justin.bourke@med.monash.edu.au> wrote in message <gfahip$crb$1@fred.mathworks.com>...
> This bug was fixed in 2008b, but had a work around for earlier versions, not sure that it is what you are looking for, but it seems like it could help:
>
> 'System error resulting in a corrupted FIG-file when building a GUI in GUIDE' http://www.mathworks.com/support/bugreports/details.html?rp=452282

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us