Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Guide errors creating a simple gui
Date: Thu, 6 Nov 2008 10:42:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 89
Message-ID: <geuhlp$kvv$1@fred.mathworks.com>
References: <g261h2$ic2$1@fred.mathworks.com> <g7hedl$k3j$1@fred.mathworks.com> <getkg2$1tt$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1225968121 21503 172.30.248.35 (6 Nov 2008 10:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 6 Nov 2008 10:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:499272


"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.