The interpretation of the error

12 views (last 30 days)
Zeynab Mousavikhamene
Zeynab Mousavikhamene on 10 Sep 2020
I recieve this error but the code keeps running:
Invalid or deleted object.
Error in
Error in
Error in>@(e,d)obj.showToolTip(btn)
Error in print (line 36)
drawnow; % give changes a chance to be processed
Error in saveas (line 181)
print( h, name, ['-d' dev{i}] )
Error in AllCesCalculator_20200615>sion_finder (line 334)
saveas(number_of_figures(i),fullfile(sion_path,[ number_of_figures(i).Name '.tif']));
Error in sion_AllCesCalculator_20200615>TUpdaterForsion (line 74)
Error in sion_AllCesCalculator_20200615 (line 52)
Any idea?
  1 Comment
Ameer Hamza
Ameer Hamza on 10 Sep 2020
Most probably, the handle number_of_figures(i) belongs to a deleted figure.

Sign in to comment.

Answers (1)

Vinai Datta Thatiparthi
Vinai Datta Thatiparthi on 15 Sep 2020
Hey Zeynab,
Since you haven't shared the code with us, I guess the main reason why you're getting the error is because of a referencing issue when trying to modify something incorrectly within your code. You're probably trying to access or delete something that's already deleted.
A solution to this could be to save the handles (depending on your application) and then use the 'hold on' functionality to preserve the handle.
You could also go through this MATLAB Answer to get more info.
Hope this helps!


Community Treasure Hunt

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

Start Hunting!