Matlab R2022a freezes on macOS Monterey 12.5.1 when closing a figure

153 visualizzazioni (ultimi 30 giorni)
Matlab R2022a frequently, unpredictably becomes unresponsive when closing a figure (command or "X" GUI) since upgrading to R2022a on Monterey with multiple screens. Gernerally recovers after a few minutes, but it is usually faster to force quit and restart. Launching Matlab from a command terminal these days, which seemed to help with this problem for a while.
  1 Commento
Why Why
Why Why il 1 Nov 2022
C'mon, following the official answer, it's easy, all you have to do is uninstall all the other softwares on your computer. Isn't that what you expect from such expensive software?

Accedi per commentare.

Risposte (2)

Daniel Calbick
Daniel Calbick il 3 Ott 2023
TL ; DR -- add this line to your startup.m file:
set(groot, 'defaultFigureCloseRequestFcn', 'close(gcf)');
Hopefully this is the best place to post this as it was the first hit on google when I typed "figure crashing matlab macOS." I was really hoping this issue was going to go away with the introduction of native arm64 (apple sillicon) implementation of 2023b—however much to my chagrin, I think it happened more, and more catastophically at that.
BUT, I finally found a solution that has been working well for me! (it seems obvious now and I wish I did it years ago)
So, I was having the same isue with the 'x' button in the figure GUIs completely crashing MATLAB, and that has been a think since probably R2018 or thereabouts. To fix it I add the line I wrote above to the startup.m file (a file that matlab looks for in its saved path and will exicute upon launching) that re-associates this button with the command close(gcf). Haven't had a problem since (knock on wood).
  6 Commenti
RODOLFO
RODOLFO il 17 Mar 2024 alle 10:51
I placed the file, but now when I open MATLAB, it remains in an infinite loading state and I'm forced to force quit
Daniel Calbick
Daniel Calbick il 17 Mar 2024 alle 18:19
@rodolfo, what did you actually put into your startup.m file?

Accedi per commentare.


Kannan
Kannan il 26 Set 2022
The problem you are facing seems to be caused by apps trying to use the Accessibility API to communicate with other applications and how MATLAB responds to it. You will have to disable the accessibility API for that app that is triggering this 'bug' in MATLAB and causing it to hang. Please refer to the answer posted here: https://www.mathworks.com/matlabcentral/answers/480796-not-responding-on-startup-macos-mojave.
  7 Commenti
Javen
Javen il 15 Nov 2022
If you have dig more into the issue, you will understand this is not caused by this problem. AXEnhancedUserInterface is never enabled for MATLAB and such log will not show up in Rectangle or similar apps.
MATLAB's is not working correctly not only with Window management app, but also other apps that uses accessibility API.
And clearly from your respond, Mathworks is aware of this issue and they reject to fix this because this "may" caused by Apple and doesn't want to apply a fix for it although it affects users experience.
I am aware that engineers are busy doing computation related development and I am thankful that Mathworks provides new features to make students and researchers work more fluent than ever before. It's just I don't understand why ignore this specific issue.
Walter Roberson
Walter Roberson il 18 Nov 2022
And clearly from your respond, Mathworks is aware of this issue
I do not work for Mathworks. Sometimes they tell me the reasons they do things, sometimes they do not.
The point of my posting is that there are other applications (not just MATLAB) having response delay and freezing problems due to the accessibility interface, that it is not only a MATLAB problem, that generally speaking such problems arose due ot changes at the Apple side.
Apple is notoriously stubborn about their changes, so likely the resolution is going to have to be Mathworks finding a way to work around the problem that Apple introduced, rather than Apple changing something on their end.

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by