f



Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes

Hi, 

I've been getting this error recently, and I've tracked it down to this line of code:

  annotation('textbox','String','testing');  

After closing the figure that appeared, I entered:

  clear classes

And then I get the following error:

  Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes

Can anyone reproduce the same error? 


Regards,
Yu Ang

PS: Error only appeared when I do this in MATLAB 2011a. 
No error appeared when I do the same on MATLAB 2010b.

PPS: I suspect that something was modified, as I did not have the same error message earlier before.
0
tan.ya (8)
6/5/2011 11:31:04 PM
comp.soft-sys.matlab 211264 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

4 Replies
863 Views

Similar Articles

[PageSpeed] 8

Ive noticed this in 2011a as well and think its a bug. I dont think you are doing anything wrong.

Try this:

- Start a fresh MATLAB
- Type: >> plot(1:10);
- On the figure window open and close plot tools (you dont need to do anything else)
- Close the figure window
- Type: >> clear classes;
- You should see:

Warning: Objects of graphics.plotmanager class exist - not clearing this class
or any of its super-classes 

Its annoying but hasnt seemed to cause me any other issues so is tolerable.


"Yu Ang " <tan.ya@techsource.com.my> wrote in message <ish3jo$25n$1@newscl01ah.mathworks.com>...
> Hi, 
> 
> I've been getting this error recently, and I've tracked it down to this line of code:
> 
>   annotation('textbox','String','testing');  
> 
> After closing the figure that appeared, I entered:
> 
>   clear classes
> 
> And then I get the following error:
> 
>   Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes
> 
> Can anyone reproduce the same error? 
> 
> 
> Regards,
> Yu Ang
> 
> PS: Error only appeared when I do this in MATLAB 2011a. 
> No error appeared when I do the same on MATLAB 2010b.
> 
> PPS: I suspect that something was modified, as I did not have the same error message earlier before.
0
owrnews (6)
6/6/2011 11:00:19 PM
As an update:

I've requested for technical support from Mathworks and they're looking into it.

Regards
Yu Ang

"owr" wrote in message <isjm63$hc2$1@newscl01ah.mathworks.com>...
> Ive noticed this in 2011a as well and think its a bug. I dont think you are doing anything wrong.
> 
> Try this:
> 
> - Start a fresh MATLAB
> - Type: >> plot(1:10);
> - On the figure window open and close plot tools (you dont need to do anything else)
> - Close the figure window
> - Type: >> clear classes;
> - You should see:
> 
> Warning: Objects of graphics.plotmanager class exist - not clearing this class
> or any of its super-classes 
> 
> Its annoying but hasnt seemed to cause me any other issues so is tolerable.
> 
> 
> "Yu Ang " <tan.ya@techsource.com.my> wrote in message <ish3jo$25n$1@newscl01ah.mathworks.com>...
> > Hi, 
> > 
> > I've been getting this error recently, and I've tracked it down to this line of code:
> > 
> >   annotation('textbox','String','testing');  
> > 
> > After closing the figure that appeared, I entered:
> > 
> >   clear classes
> > 
> > And then I get the following error:
> > 
> >   Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes
> > 
> > Can anyone reproduce the same error? 
> > 
> > 
> > Regards,
> > Yu Ang
> > 
> > PS: Error only appeared when I do this in MATLAB 2011a. 
> > No error appeared when I do the same on MATLAB 2010b.
> > 
> > PPS: I suspect that something was modified, as I did not have the same error message earlier before.
0
tan.ya (8)
6/13/2011 1:43:04 AM
Update from the Development team:

This is a general warning that you see from the class system when a class definition cannot be cleared because there are instances of it that still exist which also cannot be cleared.  You see it here probably because the graphics.plotmanager class is a singleton and that singleton copy is not easy to clear.

The warning is expected and can be ignored.  This can be done by the following command:
  >> warning('off', ' MATLAB:ClassInstanceExists');



"Yu Ang Tan" <tan.ya@techsource.com.my> wrote in message <it3pv8$hv6$1@newscl01ah.mathworks.com>...
> As an update:
> 
> I've requested for technical support from Mathworks and they're looking into it.
> 
> Regards
> Yu Ang
> 
> "owr" wrote in message <isjm63$hc2$1@newscl01ah.mathworks.com>...
> > Ive noticed this in 2011a as well and think its a bug. I dont think you are doing anything wrong.
> > 
> > Try this:
> > 
> > - Start a fresh MATLAB
> > - Type: >> plot(1:10);
> > - On the figure window open and close plot tools (you dont need to do anything else)
> > - Close the figure window
> > - Type: >> clear classes;
> > - You should see:
> > 
> > Warning: Objects of graphics.plotmanager class exist - not clearing this class
> > or any of its super-classes 
> > 
> > Its annoying but hasnt seemed to cause me any other issues so is tolerable.
> > 
> > 
> > "Yu Ang " <tan.ya@techsource.com.my> wrote in message <ish3jo$25n$1@newscl01ah.mathworks.com>...
> > > Hi, 
> > > 
> > > I've been getting this error recently, and I've tracked it down to this line of code:
> > > 
> > >   annotation('textbox','String','testing');  
> > > 
> > > After closing the figure that appeared, I entered:
> > > 
> > >   clear classes
> > > 
> > > And then I get the following error:
> > > 
> > >   Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes
> > > 
> > > Can anyone reproduce the same error? 
> > > 
> > > 
> > > Regards,
> > > Yu Ang
> > > 
> > > PS: Error only appeared when I do this in MATLAB 2011a. 
> > > No error appeared when I do the same on MATLAB 2010b.
> > > 
> > > PPS: I suspect that something was modified, as I did not have the same error message earlier before.
0
tan.ya (8)
6/27/2011 1:42:02 AM
Hi Development Team,

Regarding your solution: I fear that it is not useful, since it is an overkill. 

I mean, it is valid and does its intended job. However, from my point of view, the warning  'MATLAB:ClassInstanceExists' is a generic warning for all Matlab singleton classes; supressing it in the entire global workspace may cause omition of important warning prompts of other singletons. Meaning, if one tries to clear a singleton and for some reason it is not cleared, one will not be aware of this issue (because the same supressed warning identifier is thrown) and may encounter unintended behaviour later on.

For this reason, I am reluctant to use such a solution.  Have you got any trick or suggestion to supress this warning only for the graphics.plotmanager class?

Best regards,
Yaroslav

"Yu Ang Tan" <tan.ya@techsource.com.my> wrote in message <iu8n5a$5od$1@newscl01ah.mathworks.com>...
> Update from the Development team:
> 
> This is a general warning that you see from the class system when a class definition cannot be cleared because there are instances of it that still exist which also cannot be cleared.  You see it here probably because the graphics.plotmanager class is a singleton and that singleton copy is not easy to clear.
> 
> The warning is expected and can be ignored.  This can be done by the following command:
>   >> warning('off', ' MATLAB:ClassInstanceExists');
> 
> 
> 
> "Yu Ang Tan" <tan.ya@techsource.com.my> wrote in message <it3pv8$hv6$1@newscl01ah.mathworks.com>...
> > As an update:
> > 
> > I've requested for technical support from Mathworks and they're looking into it.
> > 
> > Regards
> > Yu Ang
> > 
> > "owr" wrote in message <isjm63$hc2$1@newscl01ah.mathworks.com>...
> > > Ive noticed this in 2011a as well and think its a bug. I dont think you are doing anything wrong.
> > > 
> > > Try this:
> > > 
> > > - Start a fresh MATLAB
> > > - Type: >> plot(1:10);
> > > - On the figure window open and close plot tools (you dont need to do anything else)
> > > - Close the figure window
> > > - Type: >> clear classes;
> > > - You should see:
> > > 
> > > Warning: Objects of graphics.plotmanager class exist - not clearing this class
> > > or any of its super-classes 
> > > 
> > > Its annoying but hasnt seemed to cause me any other issues so is tolerable.
> > > 
> > > 
> > > "Yu Ang " <tan.ya@techsource.com.my> wrote in message <ish3jo$25n$1@newscl01ah.mathworks.com>...
> > > > Hi, 
> > > > 
> > > > I've been getting this error recently, and I've tracked it down to this line of code:
> > > > 
> > > >   annotation('textbox','String','testing');  
> > > > 
> > > > After closing the figure that appeared, I entered:
> > > > 
> > > >   clear classes
> > > > 
> > > > And then I get the following error:
> > > > 
> > > >   Warning: Objects of graphics.plotmanager class exist - not clearing this class or any of its super-classes
> > > > 
> > > > Can anyone reproduce the same error? 
> > > > 
> > > > 
> > > > Regards,
> > > > Yu Ang
> > > > 
> > > > PS: Error only appeared when I do this in MATLAB 2011a. 
> > > > No error appeared when I do the same on MATLAB 2010b.
> > > > 
> > > > PPS: I suspect that something was modified, as I did not have the same error message earlier before.
0
valvaldon (1)
12/31/2011 8:23:07 AM
Reply: