Matlab 2020b crashes everytime I close a figure manually

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.
Sune

7 Comments

I also have this problem. Any solutions yet?
I couldn't find a solution either, so I just downloaded Matlab 2019b again instead. No problem since.
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.
THANK YOU!
I'm having the same issue with R2021b and I can now tell that the problem has to do with the combination of Matlab and Grammarly, quitting the latter resolves the issue for now in my case.
On macOS 12.2.1, Matlab R2022a. Block Gramerly for matlab do the job.
let me share with you a simple solution that I found and it solved this issues , I read some solution from this link:https://www.mathworks.com/matlabcentral/answers/866895-matlab-is-very-slow-on-macos-big-sure
and found this one by Fenglong Song, so all you have to do is goto -> General -> Source control and select 'None'.
and that solved my problem with matlab freezing each time I close a plot

Sign in to comment.

Answers (9)

ruubef
ruubef on 26 Jan 2022
Edited: ruubef on 27 Jan 2022
The app "Grammarly" also generates this issue. Disintalling Grammarly solves the problem.

5 Comments

It workes for me, but it was very inconvenient to quit "Grammarly" every time.
Thanks!
Grammarly was the problem for me. Now, I quit Grammarly when using Matlab 2021b.
Thank you! This issue still exists in 2022. Impressive....
Same here grammarly causing the Matlab to fail either furing uigetdir or while closing a figure. Thanks a lot for your solution.
Thanks! It works for me too. Remember to uninstall all applications related to Grammarly.

Sign in to comment.

I have the same problem with R2023b. Try to close scopes... crashes and I get spinning beach balls.
That can happen if you have a ClosereqFcn callback that does not return.
To examine this, check
fig = gcf;
disp(get(fig, 'CloseRequestFcn'))
disp(get(groot,'DefaultFigureCloseRequestFcn'))
Normal is to see closereq for both of those, and for
>> which closereq
/Applications/MATLAB_R2020b.app/toolbox/matlab/graphics/closereq.m

2 Comments

Thanks for your answer. I get 2 x closereq, and /Applications/MATLAB_R2020b.app/toolbox/matlab/graphics/closereq.m
Thanks for the ansewr! This is also the issue for me. But how can I resolve this problem?

Sign in to comment.

I also saw this problem recently on macOS. This problem is caused by how MATLAB respond to accessibility API. Read the answer here: https://www.mathworks.com/matlabcentral/answers/480796-not-responding-on-startup-macos-mojave. 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

Thanks for your answer. This could be the case, I will check and get back with outcome.

Sign in to comment.

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?
I have the same problem also with R2023b. Whenver I try to close the figures manually with the red x on the top left corner, it crashes (application does not respond while I get the spinning beach ball).
It is usually Magnet or something similar

2 Comments

I don’t have Magnet or any other window manager
Moom Many Tricks may as well cause issues.

Sign in to comment.

Same problem here while using PLS Toolbox, every time i close a figure i get the spinning beach ball, I tried reinstalling everything but nothing has changed. MBP 14 M1 Pro with Sonoma 14.2.1 and Matlab 2023b.
I experience same issue on MAC book Pro. Matlab 2020b and Matlab 2022a. While editing the figure or scope image.

Categories

Asked:

snj
on 13 Nov 2020

Commented:

on 29 Jan 2024

Community Treasure Hunt

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

Start Hunting!