MATLAB Answers

Matlab 2020b crashes everytime I close a figure manually

102 views (last 30 days)
snj on 13 Nov 2020
Commented: Kevin1988 on 28 Jun 2021
On macbook pro, Matlab 2020b crashes (or rather hangs/becomes unresponsive) everytime I close a figure manually, i.e. click the red cross on the figure window. Close all works fine though.
Kevin1988 on 28 Jun 2021
I do have the same problem with R2021a.
It first was only the case when using Simulink and zooming into a scope. But now even if I try to close a simple figure using the red close-button Matlab crashes completly since it's not responding anymore.
Yes, I do use the window Rectangle but I don't want to have to turn this app down since window management in macOS is already quite bad.
Dear The Mathworks Inc.,
PLEASE ADDRESS THIS ISSUE CONCERNING THE ACCESSIBILITY API ON macOS which is persistent in the macOS version of Matlab for more then three years now. I'm using Matlab R2017b in mid 2021 since the application DOESN'T WORK properly on macOS. Everytime I try to update to a newer version I'm more than dissapointed and I furiously trowing the app into the trash bin making sure to delete it completly in the next second. I'm greated with the same errors again and again, version for version.
Yes I already changed the Java version inside of Matlab but this doesn't help or causes a ton of other issues including red error messages in the command window.

Sign in to comment.

Answers (4)

Ameer Hamza
Ameer Hamza on 13 Nov 2020
I also saw this problem recently on macOS. This problem is caused by how MATLAB respond to accessibility API. Read the answer here: One of the other apps on your macOS is causing this problem (apparently not their fault, rather how MATLAB responds to those apps). The only workaround is to disable the accessibility API for that app. You need to do trial and error to find out which app is causing the issue.
  1 Comment
snj on 16 Nov 2020
Thanks for your answer. This could be the case, I will check and get back with outcome.

Sign in to comment.

Wayne Martin
Wayne Martin on 14 Mar 2021
I have this problem on Windows. When I look at the status of the Matlab program, it is waiting on network io. It always clears itself in anthing from a few seconds to a few minutes, as though something responds or times out. Dont' know what it's waiting for?

Walter Roberson
Walter Roberson on 13 Nov 2020
That can happen if you have a ClosereqFcn callback that does not return.
To examine this, check
fig = gcf;
disp(get(fig, 'CloseRequestFcn'))
Normal is to see closereq for both of those, and for
>> which closereq
  1 Comment
snj on 16 Nov 2020
Thanks for your answer. I get 2 x closereq, and /Applications/

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!