フィルターのクリア

Matlab R2022a freezes on macOS Monterey 12.5.1 when closing a figure

82 ビュー (過去 30 日間)
Dirk
Dirk 2022 年 9 月 19 日
編集済み: Daniel Calbick 2024 年 4 月 12 日
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 件のコメント
Why Why
Why Why 2022 年 11 月 1 日
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?

サインインしてコメントする。

回答 (2 件)

Daniel Calbick
Daniel Calbick 2023 年 10 月 3 日
編集済み: Daniel Calbick 2024 年 4 月 12 日
TL ; DR -- add this line to your startup.m file:
set(groot, 'defaultFigureCloseRequestFcn',@(src,evt) delete(src));
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 件のコメント
RODOLFO
RODOLFO 2024 年 3 月 17 日
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 2024 年 3 月 17 日
@rodolfo, what did you actually put into your startup.m file?

サインインしてコメントする。


Kannan
Kannan 2022 年 9 月 26 日
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 件のコメント
Javen
Javen 2022 年 11 月 15 日
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 2022 年 11 月 18 日
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.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by