Fix to frequent "Application not responding" for MATLAB on the Mac
145 views (last 30 days)
Show older comments
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 Comments
Voss
ungefär 2 timmar ago
@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
15 minuter ago
@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.
Answers (1)
Animesh
on 3 May 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:
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!