removing DeleteFcn of all descendants to prevent infinite loop
조회 수: 2 (최근 30일)
이전 댓글 표시
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
2017년 10월 6일
Hi, Was this problem solved. I too encountered a similar behavior and am looking for ways to solve it.
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 Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!