Why do I get "Warning: Cannot load an object of class 'listener':" when I open figure?
조회 수: 16 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2023년 7월 6일
답변: MathWorks Support Team
2023년 7월 20일
Why do I get the warning below when I open a MATLAB figure (.fig) ?
Warning: Cannot load an object of class 'listener':
No matching constructor signature found.
> In matlab.graphics.internal.figfile.FigFile/read (line 31)
In matlab.graphics.internal.figfile.FigFile
In loadFigure (line 31)
In openfig>localOpenFigure (line 75)
In openfig (line 40)
In open (line 139)
In uiopen (line 122)
Warning: During load:
An invalid default object has been detected while loading a heterogeneous array of class
event.listener. An empty array of class event.listener will be returned.
> In matlab.graphics.internal.figfile.FigFile/read (line 31)
In matlab.graphics.internal.figfile.FigFile
In loadFigure (line 31)
In openfig>localOpenFigure (line 75)
In openfig (line 40)
In open (line 139)
In uiopen (line 122)
Warning: Cannot load an object of class 'proplistener':
No matching constructor signature found.
> In matlab.graphics.internal.figfile.FigFile/read (line 31)
In matlab.graphics.internal.figfile.FigFile
In loadFigure (line 31)
In openfig>localOpenFigure (line 75)
In openfig (line 40)
In open (line 139)
In uiopen (line 122)
Warning: During load:
An invalid default object has been detected while loading a heterogeneous array of class
event.proplistener. An empty array of class event.proplistener will be returned.
> In matlab.graphics.internal.figfile.FigFile/read (line 31)
In matlab.graphics.internal.figfile.FigFile
In loadFigure (line 31)
In openfig>localOpenFigure (line 75)
In openfig (line 40)
In open (line 139)
In uiopen (line 122)
채택된 답변
MathWorks Support Team
2023년 7월 6일
이 답변에 Ralph N
님이 플래그를 지정함
The cause of the warning message is that while loading the object from the MAT-File, MATLAB was not able to attach the listener back to the object. This is caused by a bug from MATLAB Releases early than R2016a.
This bug has been fixed since R2016b. The listener was saved to transient property on a figure rather than inside appdata. However, figures generated from an earlier release could still trigger these warning messages in all MATLAB Releases. But these warning messages should not affect the normal use of the loaded figure.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Images, Figures, Axes, Equations, MATLAB Code, and MATLAB Variables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!