Filter löschen
Filter löschen

removing DeleteFcn of all descendants to prevent infinite loop

1 Ansicht (letzte 30 Tage)
Shahar
Shahar am 1 Nov. 2011
Kommentiert: Jan am 6 Okt. 2017
When trying to close my gui which contains a plot of several graphs, I encountered an error (below). This error repeated continuously (infinite loop of error) and I wanted to know how can I avoid it.
Here is my close request function:
function figure1_CloseRequestFcn(hObject, eventdata, handles)
AllMyTimers = timerfind('Tag', 'myTimers');
if ~isempty(AllMyTimers)
stop( AllMyTimers );
delete(AllMyTimers);
end
delete(hObject); % this is where the crash occures (2688 in figure1_CloseRequestFcn )
------ The error: -----
Warning: Too many objects created while deleting uipanel children; removing DeleteFcn of all descendants to prevent infinite loop.
> In MainGUI>figure1_CloseRequestFcn at 2688
In gui_mainfcn at 96
In MainGUI at 33
In @(hObject,eventdata)MainGUI('figure1_CloseRequestFcn',hObject,eventdata,guidata(hObject))
{Warning: Too many objects created while deleting uipanel children;
removing DeleteFcn of all descendants to prevent infinite loop}
> In MainGUI>figure1_CloseRequestFcn at 2688
In gui_mainfcn at 96
In MainGUI at 33
In @(hObject,eventdata)MainGUI('figure1_CloseRequestFcn',hObject,eventdata,guidata(hObject))
{Warning: Too many objects created while deleting uipanel children;
removing DeleteFcn of all descendants to prevent infinite loop}
...
and so on, infinitely.
  4 Kommentare
Dhanya
Dhanya am 6 Okt. 2017
Hi, Was this problem solved. I too encountered a similar behavior and am looking for ways to solve it.
Jan
Jan am 6 Okt. 2017
@Dhanya: This thread could be solved, because Shahar did not show the code (although "I've added my figure1_CloseRequestFcn" seems to imply this). Without seeing the code, how could we suggest an improvement? So please open a new thread and add the details.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by