I'm running R2022a on Mac OS V11.4. This symptom is very repeatable. It goes like this.
  • I start Matlab
  • I plot something
  • I close the figure with the Close button (the X)
  • I get the spinning wheel and Matlab is no longer responsive, has to be shut down. The spinning wheel never stops, I never am able to type in the command window again after that.
I just did the experiment with closing the figure with delete(). That worked fine. Then I tried again with the close button, and the wheel is spinning again.
Has anyone else seen this and do you have any idea what the cause might be?

7 Kommentare

Walter Roberson
Walter Roberson am 1 Jul. 2022
Are you using an third-party window control programs such as Magnet? Or do you have any programs connected through Accessibility, such as Grammarly?
Eduard
Eduard am 5 Okt. 2022
FWIW I am having the same problem. OS 12.6 Matlab_R2022a
Eduard
Eduard am 5 Okt. 2022
I can confirm someone else's observation somewhere else, that it occurs when I close windows using the red close butten, not when closing windows on the cammand line ('close all')
What does this return? The result below shows the default value of the close request function. Check if it's empty or has some other definition.
fig = figure();
fig.CloseRequestFcn
ans = 'closereq'
Huixin
Huixin am 2 Jan. 2024
Verschoben: Dyuman Joshi am 2 Jan. 2024
I have the same problem and even though I set the 'full disk access', it still exits.
Nancy Lindsey
Nancy Lindsey am 22 Mai 2024
Bearbeitet: Nancy Lindsey am 22 Mai 2024
I'm having the same issue. I think the one answer below isn't understanding the problem correctly–– Matlab is actually able to plot just fine. It breaks only upon hitting the 'X' to close the figure. And, at least for me, it doesn't do this with every figure, but I have no idea why it happens when it does–– the data is fine, and it's not a really huge plot or anything. If instead of clicking the 'X' you just type 'close all' in the command line, it doesn't crash.
Catherine Davey
Catherine Davey am 18 Nov. 2024
Happens for me too. I'm on a mac and it's fine when I press apple-w, but not when I press the red cross or programmatically run 'close(fh)'.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Riya
Riya am 15 Sep. 2023

0 Stimmen

Hello Randall Poe,
As per my understanding, as soon as you start working in MATLAB, it launches successfully; however, when you attempt to create plots, the MATLAB window freezes, displaying no content, and necessitating a force quit.
To solve this issue, you can try out one of the following things:
You can start MATLAB through the terminal via
/Applications/MATLAB_R2019b.app/bin/matlab
But the real problem solver is to give it full disk access. Please note that you can add MATLAB under System Preferences --> Security & Privacy --> Privacy --> Full Disk Access. Or, if MATLAB isn't listed, click on the + and look for it in the Application folder and add it to the list manually.
Another reason could be a recurring issue with Accessibility Options. It is possible that another application is using Accessibility features which are causing this issue. Please refer to the following MATLAB Answers link and navigate to Jon Gotow's answer where he describes how to check what applications use the Accessibility api.
I hope it helps!

4 Kommentare

Walter Roberson
Walter Roberson am 15 Sep. 2023
No, @Randall Poe is fine when creating plots. The problem only occurs when they use the X to close a figure, with it working fine to delete() the figure.
I rather doubt that it was related to Full Disk Access.
Huixin
Huixin am 2 Jan. 2024
I have the same problem. After I set "Full Disk Access" for Matlab, the problem is still there.
Riya
Riya am 5 Jan. 2024
@Huixin Can you please specify exact problem and MATLAB Version and OS?
I am having same problem. I am using 2023b apple silicon version

Melden Sie sich an, um zu kommentieren.

Jesus
Jesus am 1 Jul. 2026

0 Stimmen

Having the same problem here, and the giving "Full Disk Access" option DOES NOT work.

Kategorien

Mehr zu Creating, Deleting, and Querying Graphics Objects finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2022a

Gefragt:

am 1 Jul. 2022

Beantwortet:

am 1 Jul. 2026

Community Treasure Hunt

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

Start Hunting!

Translated by