Effacer les filtres
Effacer les filtres

Fix to frequent "Application not responding" for MATLAB on the Mac

145 vues (au cours des 30 derniers jours)
Daniel Dolan
Daniel Dolan le 30 Avr 2024
Commenté : Daniel Dolan il y a environ 2 heures
I am frequently having the Mac version of MATLAB lock up in "Application not responding", leading to "Force quit" in the Finder or Terminal. I have found no specific way to reproducibly make this happen, but it tends to occur after a number of traditional (Java based) figures are opened and closed. The problem occurs in several hand-coded graphical interfaces (not GUIDE, pre-App Designer) that have worked for years, and it seems to be getting worse.
As far as I can tell, this is a Mac-specific problem. I thought it was confined to Silicon machines, but the same behavior occurs for Silicon machines running the Intel version of MATLAB as well as Intel machines. I see it a lot in releases 2023b and 2024a, even after updates, but one of my users reports problems as far back as 2021a. I know that I see more and more frequency Java errors in the command window in recent years, and these often preceed MATLAB freezing altogether. Just today, I've observed the problem when using Corretto 11 and 17 (only 2024a supports this), and I'm pretty sure it happens with Corretto 8.
A Javascript version (uifigure) of the same graphical interfaces presumably would not experience this problem, but it would take an enormous amount of work to transition these program over from legacy code. Despite what the Bug Fixes say in updates and new releases, the problem has not been fixed. Any ideas?
  5 commentaires
Voss
Voss il y a environ 4 heures
@Daniel Dolan: Transitioning programmatic GUI code from figures to uifigures might be easier than you think (e.g., in my experience, uifigures appear to support uicontrols, in spite of what the uicontrol documentation claims).
Daniel Dolan
Daniel Dolan il y a environ 2 heures
@Walter Roberson: if I understand you correctly, there were no problems on your Intel Macs until recently. That would be consistent with my experience, though hard to test because most of my users have moved over to Silicon machines. Troubleshooting the interaction between MATLAB, Apple, and the Java library (e.g., Amazon) is fiendishly difficult.
@Voss I started down the transition from figures to uifigures and independently discovered lots of undocumented stuff, such as uicontrols working in uifigures. I am not sure what to make to of that. I don't want to invest lots of time into something that might change or be completely redone in the next version. Mathworks should be more open about this Java to Javascript transition, which has been going on for nearly a decade. Apart from some conceptual changes, I can see almost everything is in place for a full transition to Javascript graphics. Two missing features for me are the Extent property (sizing items based on their content) and better print/export support. I wish this details would get more attention--I really don't care about Live Editor updates or new AppDesigner widgets that keep getting released.

Connectez-vous pour commenter.

Réponses (1)

Animesh
Animesh le 3 Mai 2024
I have encountered a similar issue before. It seems to be related to the version of Java that comes with MATLAB, which has not been updated for some time.
A workaround that helped me was to update to the recommended version of Java.
You can refer to the following MathWorks article on how to configure your system to use Java:
  1 commentaire
Daniel Dolan
Daniel Dolan le 3 Mai 2024
I've observed the problems with three versions (8, 11, and 17) of Amazon Coretto in MATLAB 2024a. Version 8 seems to be a little more stable, but freezes still happen. It's hard to track because no specific sequence reproducibly causes MATLAB to freeze.
I have not tried Adoptium OpenJDK yet--is that what you are using? I wonder why Mathworks lists it on that page, but the installation instructions suggests Coretto.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Produits


Version

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by