Why do I get "Warning: Cannot load an object of class 'listener':" when I open figure?
    17 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    MathWorks Support Team
    
 el 6 de Jul. de 2023
  
    
    
    
    
    Respondida: MathWorks Support Team
    
 el 20 de Jul. de 2023
            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) 
Respuesta aceptada
  MathWorks Support Team
    
 el 6 de Jul. de 2023
        
				
				Ralph N
 ha marcado con alerta este/a respuesta
				
			
			
		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 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Images, Figures, Axes, Equations, MATLAB Code, and MATLAB Variables en Help Center y File Exchange.
			
	Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
