필터 지우기
필터 지우기

removing DeleteFcn of all descendants to prevent infinite loop

조회 수: 1 (최근 30일)
Shahar
Shahar 2011년 11월 1일
댓글: Jan 2017년 10월 6일
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
Dhanya
Dhanya 2017년 10월 6일
Hi, Was this problem solved. I too encountered a similar behavior and am looking for ways to solve it.
Jan
Jan 2017년 10월 6일
@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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by