Matlab2023b works fine on my computer with macOS 13.6. I find that the matlab 2023b is supported on Sonoma, so I update the system to it. However, after the update matlab crashs each time I launch it. And I find similar report on stack overflow.
The crash report:
--------------------------------------------------------------------------------
Segmentation violation detected at 2023-10-02 08:03:40 +0800
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Java Version : Java 1.8.0_382-b05 with Amazon.com Inc. OpenJDK 64-Bit Server VM mixed mode
MATLAB Architecture : maca64
MATLAB Entitlement ID : [FILTERED]
MATLAB Root : /Applications/MATLAB_R2023b.app
MATLAB Version : 23.2.0.2365128 (R2023b)
OpenGL : hardware
Operating System : Mac OS 版本14.0(版号23A344)
Process ID : 5522
Processor ID : ABI64 ARM ARM64E FIRESTORM_ICESTORM HG
Session Key : [FILTERED]
Window System : Quartz
Fault Count: 1
Abnormal termination:
Segmentation violation
Current Thread: '' id 0x294e2b000
Register State (from fault):
X0 = 0000000000000012 X1 = 0000000000000000
X2 = 0000000000000001 X3 = 0000000000000000
X4 = 00000001d9ae8630 X5 = 0000000000000000
X6 = 0000000000000000 X7 = 0000000000000403
X8 = 1194967f20a30012 X9 = 0000000000000000
X10 = 0000000000000001 X11 = 0000000000000000
X12 = 0000000010800000 X13 = 0000000000000001
X14 = 0000000000000000 X15 = 0000000084004000
X16 = 0000000182884e00 X17 = 0000000237fd36d0
X18 = 0000000000000000 X19 = 0000000236d00a60
X20 = 0000000000000000 X21 = 0000000000000000
X22 = 0000000294e2a670 X23 = 000000000000001a
X24 = 0000000000000000 X25 = 0000000000000000
X26 = 0000000294e290e0 X27 = 0000000000000000
X28 = 0000600065e36520
FP = 0000000294e27ae0 LR = 5154800182884e38
SP = 0000000294e27ae0 PC = 00000001829cd6f0
CPSR = 60001000
Stack Trace (from fault):
[ 0] 0x0000000104904d90 /Applications/MATLAB_R2023b.app/bin/maca64/libmwfl.dylib+00019856 _ZN10foundation4core4diag15stacktrace_base7captureERKNS1_14thread_contextEm+00000064
[ 1] 0x0000000104907c58 /Applications/MATLAB_R2023b.app/bin/maca64/libmwfl.dylib+00031832 _ZN10foundation4core4test17terminate_handledERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+00002144
[ 2] 0x0000000104907118 /Applications/MATLAB_R2023b.app/bin/maca64/libmwfl.dylib+00028952 _ZN10foundation4core4diag13terminate_logEPKcPK17__darwin_ucontext+00000140
[ 3] 0x000000010b0653b0 /Applications/MATLAB_R2023b.app/bin/maca64/libmwmcr.dylib+00529328 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00011892
[ 4] 0x000000010b063250 /Applications/MATLAB_R2023b.app/bin/maca64/libmwmcr.dylib+00520784 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00003348
[ 5] 0x000000010b060cf0 /Applications/MATLAB_R2023b.app/bin/maca64/libmwmcr.dylib+00511216 mnFatalSignalHandler+00000140
[ 6] 0x000000018284da24 /usr/lib/system/libsystem_platform.dylib+00014884 _sigtramp+00000056
[ 7] 0x0000000182884e38 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00028216 CFDictionaryGetValue+00000056
[ 8] 0x0000000182884e38 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00028216 CFDictionaryGetValue+00000056
[ 9] 0x0000000204c93578 /System/Library/PrivateFrameworks/IO80211.framework/Versions/A/IO80211+00017784 Apple80211Scan+00000584
[ 10] 0x00000001361d5994 /Applications/MATLAB_R2023b.app/bin/maca64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+01923476 FqTtUQGnylG+00000356
[ 11] 0x00000001361d5da4 /Applications/MATLAB_R2023b.app/bin/maca64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+01924516 AjEdeqBE+00000564
[ 12] 0x00000001361e4e00 /Applications/MATLAB_R2023b.app/bin/maca64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+01986048 GxnmPknfylG+00000176
[ 13] 0x00000001361e42cc /Applications/MATLAB_R2023b.app/bin/maca64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+01983180 OexMpdMAylG+00000332
[ 14] 0x00000001361e4628 /Applications/MATLAB_R2023b.app/bin/maca64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+01984040 tQpdOundylG+00000052
[ 15] 0x000000018281f034 /usr/lib/system/libsystem_pthread.dylib+00028724 _pthread_start+00000136
[ 16] 0x0000000182819e3c /usr/lib/system/libsystem_pthread.dylib+00007740 thread_start+00000008
PS: when I run matlab on terminal, there are two warnings as:
CodeCache is full. Compiler has been disabled.
Try increasing the code cache size using -XX:ReservedCodeCacheSize=
objc[16042]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x2325b2888) and /Applications/MATLAB_R2023b.app/bin/maca64/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib (0x10bc41e70).
One of the two will be used. Which one is undefined.

56 commentaires

Jianrong Jia
Jianrong Jia le 2 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I have the same issue on Mac mini 2023.
the cyclist
the cyclist le 2 Oct 2023
Modifié(e) : the cyclist le 24 Jan 2024
I have no problem running R2023b after upgrade to Sonoma, on Macbook Pro with M1 Silicon.
Update: MATLAB is not crashing soon after startup, but it definitely crashes more often now. As a few answers/comments have mentioned, closing figures (via the X in the figure window) does seem to be a catalyst. Closing figures using the close command does not cause a crash for me.
Update: Installing R2023b Update 2 has not resolved this for me. (No mention of this in the release notes, as far as I saw.)
Update: I've had lots of interaction with MW support on this. Some suggested fixes (based solely on inspecting my personal setup) included shutting off various Accessibility settings, and turning off the 3rd-party software Flux. So far, nothing has helped.
Update: @Jinbo Zhang had success by fresh install of R2023b, and removing all older releases. This did not help me -- closing figures via the X in the figure window still causes MATLAB to hang.
Update: If you are having only the figure-closing issue, a work-around for me is to make sure that the window focus is not on the window you are closing, before you hit the X.
Update: The Sonoma update (14.3) seems to have fixed this problem for me.
Walter Roberson
Walter Roberson le 2 Oct 2023
For whatever it is worth, I am running R2023b without problem on Sonoma on an intel iMac.
ZONGCHAO
ZONGCHAO le 2 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
same issue after updating to sonoma version
Jawed Hakimi
Jawed Hakimi le 2 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I have problems where I can't close figures. m1 max macbook, macos sonoma 14.0
AEK
AEK le 2 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
Same problem. Appears a few minutes after startup. Even if I don't do anything.
--------------------------------------------------------------------------------
Segmentation violation detected at 2023-10-02 16:08:37 +0300
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Apple Apple M2 Max Version 2.1 Metal - 86
Graphics Text Issue Info : xmin=-221.000000, ymin=-5.500000, xmax=0.000000, ymax=5.500000
Java Version : Java 1.8.0_382-b05 with Amazon.com Inc. OpenJDK 64-Bit Server VM mixed mode
MATLAB Architecture : maca64
MATLAB Root : /Applications/MATLAB_R2023b.app
MATLAB Version : 23.2.0.2365128 (R2023b)
OpenGL : hardware
Operating System : Mac OS 14.0 (23A344)
Processor ID : ABI64 ARM ARM64E
Window System : Quartz
Fault Count: 1
Abnormal termination:
Segmentation violation
the cyclist
the cyclist le 2 Oct 2023
I suppose a conceivable variable here is whether or not people are using the "New Desktop". I am not using it yet (and now I'm not keen to try it, just in case).
AEK
AEK le 2 Oct 2023
You mean the option to "Click Wallpaper to Reveal Desktop"? It's off for me, too. But matlab is crashing.
AEK
AEK le 2 Oct 2023
Maybe it's a matter of JVM version ? Can you write the output of "version -java" ?
Walter Roberson
Walter Roberson le 2 Oct 2023
'Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode'
for me (not having problems)
I am not using the new desktop.
@AEK the new desktop is a revised desktop that Mathworks is working on. Among other things, it supports Dark Theme
the cyclist
the cyclist le 2 Oct 2023
You can see the option to turn it on, directly above the toolstrip on the Command Window.
If you are using the new desktop, that button will say "Stop the New Desktop" instead.
huang liang
huang liang le 2 Oct 2023
I try to reinstall java and matlab, the reinstall of java has no effect and reinstall of matlab works. After reinstall the crash disappears.
Jianrong Jia
Jianrong Jia le 3 Oct 2023
Can you provide more details? I have reinstalled java and matlab but no one works.
I downloaded the new java from here: Java Downloads | Oracle 中国
huang liang
huang liang le 3 Oct 2023
The java is provided by amazon and matlab installer is from the download page.@Jianrong Jia
Jian Gao
Jian Gao le 3 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I have the same issue on Macbook pro 2020 Intel (MacOS 14.0)
MATLAB Log File: /Users/gaojian/matlab_crash_dump.1616-1
------------------------------------------------
MATLAB Log File
------------------------------------------------
--------------------------------------------------------------------------------
Segmentation violation detected at 2023-10-04 13:48:23 +0800
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Graphics Driver : Uninitialized hardware
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : maci64
MATLAB Entitlement ID : 6257193
MATLAB Root : /Applications/MATLAB R2023b.app
MATLAB Version : 23.2.0.2380103 (R2023b) Update 1
OpenGL : hardware
Operating System : Mac OS 版本14.0(版号23A344)
Process ID : 1616
Processor ID : x86 Family 6 Model 126 Stepping 5, GenuineIntel
Session Key : 4093fa5e-d226-4977-b9d7-979ebe953a4d
Window System : Quartz
Fault Count: 1
Abnormal termination:
Segmentation violation
Current Thread: '' id 0x700007ba7000
Register State (from fault):
RAX = abd8b65eb8dd0001 RBX = 00007ffb47d32b80
RCX = 0000000000000002 RDX = 0000000000000000
RSP = 0000700007ba39d0 RBP = 0000700007ba39d0
RSI = 0000000000000000 RDI = 0000000000000012
R8 = 0000000000000000 R9 = 000060002e6e4280
R10 = 0000700007ba33c0 R11 = 0000000000000206
R12 = 0000000000000000 R13 = 0000000000000000
R14 = 0000000000000000 R15 = 0000000000000000
RIP = 00007ff805c73984 RFL = 0000000000010246
CS = 000000000000002b FS = 0000000000000000 GS = 0000000000000000
Stack Trace (from fault):
[ 0] 0x0000000110003204 /Applications/MATLAB R2023b.app/bin/maci64/libmwfl.dylib+00008708 _ZN10foundation4core4diag15stacktrace_base7captureERKNS1_14thread_contextEm+00000052
[ 1] 0x00000001100061d2 /Applications/MATLAB R2023b.app/bin/maci64/libmwfl.dylib+00020946 _ZN10foundation4core4test17terminate_handledERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE+00002210
[ 2] 0x00000001100056d0 /Applications/MATLAB R2023b.app/bin/maci64/libmwfl.dylib+00018128 _ZN10foundation4core4diag13terminate_logEPKcPK17__darwin_ucontext+00000128
[ 3] 0x000000011757d5cb /Applications/MATLAB R2023b.app/bin/maci64/libmwmcr.dylib+00521675 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00011451
[ 4] 0x000000011757b5f6 /Applications/MATLAB R2023b.app/bin/maci64/libmwmcr.dylib+00513526 _Z19mnPrintErrorMessageRKNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE+00003302
[ 5] 0x0000000117579005 /Applications/MATLAB R2023b.app/bin/maci64/libmwmcr.dylib+00503813 mnFatalSignalHandler+00000149
[ 6] 0x00007ff805afc37d /usr/lib/system/libsystem_platform.dylib+00013181 _sigtramp+00000029
[ 7] 0x0000000000000008 <unknown-module>+00000000
[ 8] 0x00007ff805b34672 /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation+00026226 CFDictionaryGetValue+00000046
[ 9] 0x00007ffb1e452fb2 /System/Library/PrivateFrameworks/IO80211.framework/Versions/A/IO80211+00016306 Apple80211Scan+00000654
[ 10] 0x00000001350c85e6 /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02123238 SZrvVftOC1B2M+00000416
[ 11] 0x00000001350c8a5a /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02124378 AjEdeqBE+00000610
[ 12] 0x00000001350d8aca /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02190026 DnaJFgfabOrGzcMOQOgiJ1B2M+00000215
[ 13] 0x00000001350d8174 /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02187636 TSFahViiGsDVoPyMXCRkdcjdlGHVQrbz1B2M+00000663
[ 14] 0x00000001350d8013 /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02187283 TSFahViiGsDVoPyMXCRkdcjdlGHVQrbz1B2M+00000310
[ 15] 0x00000001350d8339 /Applications/MATLAB R2023b.app/bin/maci64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.dylib+02188089 kJGelXsocljkLRyYxULdYwxUtduHEFWisDQMLb1B2M+00000045
[ 16] 0x00007ff805acf202 /usr/lib/system/libsystem_pthread.dylib+00025090 _pthread_start+00000099
[ 17] 0x00007ff805acabab /usr/lib/system/libsystem_pthread.dylib+00007083 thread_start+00000015
Ying-Feng Hsu
Ying-Feng Hsu le 4 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I also have the exactly same issue. Any help here?
Arthur
Arthur le 4 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I have the same problem.
Joshua
Joshua le 4 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
Exact same problem for me, I deleted the app and used the newest installer, and it works now.
Jawed Hakimi
Jawed Hakimi le 4 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I did it multiple times, didnt work. Every time I close the figures it is just loading and never ends. But if I close all the figure through CMD window it works
Walter Roberson
Walter Roberson le 4 Oct 2023
@huang liang that is not Java, that is OpenJDK
Ying-Feng Hsu
Ying-Feng Hsu le 4 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
I am in Intel (MacOS 14.0). And I also uninstalled and reinstalled the latest Matlab (2023b update 1). The crash problem still remains.
Nick
Nick le 5 Oct 2023
Déplacé(e) : the cyclist le 5 Oct 2023
There were issues on that even on previous MacOS versions, but now it's getting worse.
Pay attention that you don't use tools, which work with Accessibility Features (e.g. BetterTouchTool, BetterSnapTool, iScreenShooter, etc.).
I had a debug sessions with MW engineers a year ago, and they pointed me to the stack traces from the Accessibility Framework. Seems like MATLAB uses it and coming to clash. That time re-configuring tools (e.g. BetterSnapTool allows ignoring particular applications) did help.
I didn't find yet what's causing the issues on my Mac today - so I'm also affected...
dim-ask
dim-ask le 5 Oct 2023
Closing plots through clicking the X on the window results to crash most often. Closing with cmd+w most of the times does not work. Closing with the close function works in principle, but it often messes up which window it closes, it does not always close the last "active" plot window. Zoom and other callback functions are messed up, too, and do not work well. Matlab is almost unworkable now if one is depending on interactive figures.
AEK
AEK le 6 Oct 2023
@Nick Unfortunately, no. I closed all apps with accessibility features, also revoked all accessibility permissions and rebooted the macbook. The problem still occurs.
chiran
chiran le 6 Oct 2023
Déplacé(e) : the cyclist le 6 Oct 2023
Can someone give me solution to this issue. I reinstalled matlab. But it didn't work for me. (I moved matlab to trash. Then I cleared the trash).
Stéphane
Stéphane le 6 Oct 2023
Same thing happen to me, macbook pro m1 pro. I just ignore the message (don't close the message window) and just use matlab as usual, the same way when using ventura os.
Luca Purificato
Luca Purificato le 10 Oct 2023
I have the same problems on MAcBook Air 2020 since i updated to sonoma 14. whenever I try to close figure but even when I use simulink
Ivan Rincon
Ivan Rincon le 11 Oct 2023
same here !!! every time i close a figure or try to zoom it the program crash on sonoma14.0
Leon Müller
Leon Müller le 11 Oct 2023
I have the same problem (R2023b Apple Silicon, Sonoma 14.0, M1 Pro), closing or even creating figures leads to a Matlab crash. For me, installing and enabling the new desktop beta seems to actually solve this issue (https://se.mathworks.com/matlabcentral/fileexchange/119593-new-desktop-for-matlab-beta). However, I would prefer not having to use the new desktop right now so that's still annoying, but at least a temporary workaround.
Ahmed Harbi
Ahmed Harbi le 13 Oct 2023
Same here, R2023a Apple Silicon, Sonoma 14.0, MacBook Air M1
超恒
超恒 le 13 Oct 2023
m1 pro MacBook pro Sonoma , close figure then crash
Felipe
Felipe le 13 Oct 2023
same here, Macbook Pro M1 Max, Sonoma 14.0. Workaround from Leon Muller is working for now.
Jinbo Zhang
Jinbo Zhang le 20 Oct 2023
Fresh installation of MATLAB2023b? I remove all my previous installation and preference settings, and all problem solved.
Quincy
Quincy le 24 Oct 2023
Modifié(e) : Quincy le 24 Oct 2023
Same issue here. MacBook Pro 14, M2 Pro, Sonoma 14.0.
Jinbo Zhang
Jinbo Zhang le 25 Oct 2023
Did you install the java with right version. I also use Sonoma. It is running ok. Just some freeze when update figure quickily.
Alfarizy
Alfarizy le 25 Oct 2023
Jinbo Zhang -> what version of java do you have?
Alfarizy
Alfarizy le 25 Oct 2023
I think i figured it out how to fix this problem. It seems like there is a crashed happen on the java. It can be because you have multiple JDK/JRE installed on your mac.
What I did to fix this, I uninstalled all of my JDK/JRE according to this following instruction https://www.java.com/en/download/help/mac_uninstall_java.html and also do the following after you did the instruction on the link I provided.
Uninstalling the JDK on macOS
To uninstall the JDK on macOS, you must have Administrator privileges.
Note: Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time that you perform an update of the OS.
  1. Go to /Library/Java/JavaVirtualMachines.
  2. Remove the directory where the JDK is installed by running the rm command as a root user or by using the sudo tool:$ rm -rf jdk-1.8.jdk
After you have done both two steps above, restart your mac, and download then install Amazon Corretto 8 from Matlab website. Restart your mac, and open your MATLAB_R2023B
超恒
超恒 le 6 Nov 2023
Modifié(e) : 超恒 le 7 Nov 2023
@Alfarizy it have to remove other jre ? But I have to use other version to do my jobs. I try to change default java version by change-the-default-java-jdk, and my terminal output is :
~ /usr/libexec/java_home -V
Matching Java Virtual Machines (1):
1.8.0_382 (arm64) "Amazon" - "Amazon Corretto 8" /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
~ set | grep JAVA
JAVA_HOME=/Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home
~ java -version
openjdk version "1.8.0_382"
OpenJDK Runtime Environment Corretto-8.382.05.1 (build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM Corretto-8.382.05.1 (build 25.382-b05, mixed mode)
And the matlab terminal output of run `version -java` is correct too. But all it does not work, crashing problem still.
Zhenhao Zhou
Zhenhao Zhou le 13 Nov 2023
Déplacé(e) : the cyclist le 13 Nov 2023
I just installed the latest Matlab 2023b on the new MacBook Pro with M3 chip, the same issue occurs!!!!!!!!!!!! Very annoying! I can't close figures using the red button! Does Matlab or Apple has a timeline for solving this issue?
greg wurtz
greg wurtz le 13 Nov 2023
@Zhenhao Zhou, did you update to 14.1.1. This solved the pb for me (with M2). Otherwise, selecting another window before hnadling Matlab windows also works (again, with M2).
Zhenhao Zhou
Zhenhao Zhou le 13 Nov 2023
@greg wurtz Thanks for the response. I did update to 14.1.1, unfortunately it didn't solve the pb for me. Looks like selecting another window works but isn't a perfect solution. Let's hope an official update is on the way......
GlyArg
GlyArg le 19 Nov 2023
Exact same problem here. Sonoma and crash.
But I found that the "close-figures-on-top-and-hang" problem can be fixed by setting the figure renderer to "painters". Add this to "startup.m":
set(groot, 'defaultFigureRenderer', 'painters');
If I set the renderer to "opengl" the problem appears again. So looks like it's an opengl problem.
The crash report is still there but it can be minimized and ignored.
Note: 3D-plot will be very slow using painters since hardware acceleration is not used.
Yasunori Hayashi
Yasunori Hayashi le 1 Déc 2023
Modifié(e) : Walter Roberson le 1 Déc 2023
Great this worked with me.
To edit startup.m
Weizhe Chen
Weizhe Chen le 1 Déc 2023
A good temporary solution. Thanks for sharing!
Lei Dai
Lei Dai le 8 Déc 2023
Déplacé(e) : Dyuman Joshi le 11 Déc 2023
My Matlab crashed everytime when I tried openning plot browser, or zoom-in/out my figure. It seems that something is not working well regarding the figure interface UI.
Xiliang Luo
Xiliang Luo le 8 Déc 2023
Déplacé(e) : Dyuman Joshi le 11 Déc 2023
OS: macOS Sonoma
Chip: Apple M3 Pro
Matlab Version: both 2023a and 2023b
Issue:
Whenever try to close a figure by clicking the red cross on the figure, matlab will freeze. Need to force quit and re-start.
Neal Gallagher
Neal Gallagher le 12 Déc 2023
OS: macOS Sonom 14.2.
Chip: Intel Xeon
Matlab 2022b, 2023b
Issue: Close a figure by clicking the red cross on the figure, matlab will freeze. Need to force quit and re-start. Similar behavior observed with other GUI actions (e.g., radio button and dropdown menus).
ya liu
ya liu le 13 Déc 2023
OS: macOS Sonom 14.2.
Chip: M2
Matlab 2023b
Close a figure by clicking the red cross on the figure, matlab will freeze. Need to force quit and re-start.
I use "close all" to close figures and Matlab works well! Hope this can help others!
john
john le 17 Déc 2023
Good to note that this issue is about crash report on launch.
It is not about the crash rerport on closing the figure. :)
[Updated from previous post]
OS: macOS Sonoma
Chip: Apple M3 Pro
Matlab Version: 2023b
Issue:
Previously, whenever try to close a figure by clicking the red cross on the figure, matlab will freeze. Need to force quit and re-start.
After adding the following lines in stratup.m file (i created under start folder):
set(groot, 'defaultFigureCloseRequestFcn', 'close(gcf)');
set(groot, 'defaultFigureWindowStyle', 'normal');
warning('off', 'MATLAB:close:RecursionOnClose');
Matlab will not freeze if you close a new figure plotted after the addtition of new lines.
However, matlab will freeze when you open an old figure created before or created with older version of matlab.
Benjamin Simone
Benjamin Simone le 22 Jan 2024
Déplacé(e) : Dyuman Joshi le 24 Jan 2024
Please fix this issue soon, I have research to complete for school and lots of figures to save/edit/close! I'll be able to use a school computer for the time being, but this bug is really messing up my efficiency.
To give this thread a boost of awareness for MW: I get the rainbow wheel of death on my M1 Ultra Macbook Pro with Sonoma OS when closing a figure after running a matlab file.
geofo
geofo le 24 Jan 2024
Déplacé(e) : Dyuman Joshi le 24 Jan 2024
Apple released a new vesion of Sonoma (14.3) and with this new version I can close plots in Matlab without problems. I tested this on 4 Mac computers, all work. I hope this works for you as well!
Mariano Kulish
Mariano Kulish le 8 Fév 2024
Thank you geofo! I've done the 14.3 update, and that solved it for me too! Awesome!
Alexandre
Alexandre le 13 Mar 2024
I have Sonoma 14.4 and matlab crash after a few minutes with the same error.
Alessandro
Alessandro le 27 Mar 2024
Hi
Sonoma 14.4.1 here, R2023b crashes at "close all"
Very frustrating!
A
Ali Shahdoost
Ali Shahdoost le 29 Avr 2024
I'm not happy about this issue caused from "SIGBUS" error.

Connectez-vous pour commenter.

 Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 27 Oct 2023
Modifié(e) : MathWorks Support Team le 4 Déc 2023

11 votes

Thank you all for reporting this issue. MathWorks is aware of this issue and several others related to macOS Sonoma. We are actively investigating each of them.
Please refer to this additional support article for more details on the following known issues and support for macOS Sonoma: https://www.mathworks.com/matlabcentral/answers/2044833-is-matlab-compatible-with-macos-sonoma
1. MATLAB crashes when using an Individual or Designated Computer license
Due to a bug, MATLAB crashes after a minute or two. For more information, see this article.
2. MATLAB crashes when using Oracle Java on Apple Silicon
When launching the Apple Silicon version of MATLAB, MATLAB defaults to a previously installed Oracle Java and crashes. For instructions on how to point MATLAB to Amazon Corretto 8, see this article.
3. The Intel version of MATLAB crashes when generating a C++ MEX file.
This crash occurs after MEX is invoked. For more information and a workaround, see this this article.
4. Chinese characters in MATLAB UI
When the Chinese language is present as a secondary language on the machine, portions of the MATLAB UI display Chinese characters even when preferred locale is set to English. For more information, see this article.
If you are experiencing a different issue than those described, please Contact MathWorks Support.

18 commentaires

greg wurtz
greg wurtz le 12 Nov 2023
updating to the latest MacOS 14.1.1 fixes the problem (at least as far as I can tell).
Jona Eissele
Jona Eissele le 13 Nov 2023
I attempted to test the GUI, specifically Fuzzy, to see if the update was successfull. Unfortunately, Matlab continued to crash.
Madeline Edwards
Madeline Edwards le 13 Nov 2023
Modifié(e) : Madeline Edwards le 13 Nov 2023
M1 Max 2021 with Sonoma 14.1.1 continues to crash with mex calls (will run several successfull sets of idential code and then randomly fail in the next run of that same code).
Zhenhao Zhou
Zhenhao Zhou le 13 Nov 2023
Unfortunatley updating to MacOS 14.1.1 does not solve the issue here...
Xiaoqiu HE
Xiaoqiu HE le 17 Nov 2023
Will be a solution before the end of 2023?
Catalina Trujillo
Catalina Trujillo le 24 Nov 2023
Will be a solution before the end of 2023?
zack
zack le 28 Nov 2023
Hope it be fixed soon. And if you don't close the bug report window, Matlab will still work....
geofo
geofo le 1 Déc 2023
Modifié(e) : geofo le 1 Déc 2023
Now it is December 1 2023 and after the last Sonoma update to 14.1.2 the problem is still there! Matlab, Apple what are you doing this night? I ask because we, your customers, are working night and day to fix this problem. I think it is time the two CEO's of the two companies to RESIGN!
john
john le 2 Déc 2023
Dear @geofo,
The solution is out there on the internet. However, I cannot share it here. It's one line of code (command) in the terminal that modifies the Matlab dylib file. For sure even finding that solution takes you less than two months.
geofo
geofo le 3 Déc 2023
Modifié(e) : geofo le 3 Déc 2023
Dear John, This problem persisted at least from 2021. There are hundreets of prople asking for a solution. The line you mention is not obvious for most people, for example I coudn't fine it. What about Mathwork and Apple sitting together and fixing this problem before releasing their product? Do you find it reasonable that the worlds most expensive mathematical program and the worlds most expensive personal computer do not work together because of incompetence?
  • This problem appeared for me after the update to MacOS Sonoma 14.0.0. I reported the problem to Mathworks, we had very many mail exchanges, none of the solutions I got from Mathworks worked
  • Then I discovered that if I make a fully new installation of the Mac OS, then the problem does not appear anymore. However when I made a full reset of a rather expensive MacBook Pro, the computer stopped booting, it was dead.
  • After many tries, I found a method to revive the computer (connecting the boot to another Mac) and then problem was over
  • All these tests took 1 week of hard work from my side, including nights
  • However when the update with Sonoma 14.1.2 came on Dec 1 2023, the problem was again back, so all my work was in wane
  • I lost all my trust in these two companies. I thrown away the Mac and I bought a Dell, which is much quicker and better than the Mac
  • Now I am planning to move away from Matlab to some other programming language and finally get rid of all these mediocre products from Mathworks and Apple
Walter Roberson
Walter Roberson le 3 Déc 2023
MacOS Sonoma release date was September 23, 2023, so I am not clear as to how this problem could have persisted "from 2021" ?
the worlds most expensive mathematical program
MATLAB Standard license, unlimited local workers, includes MATLAB Online: $US2350
Mathematica Standard Desktop + Cloud license, 8 local workers: $US3652 (if you want more workers you need to buy the Enterprise license at over $US9000, which allows 16 workers.)
Maple 2023 Professional: $US2990
the worlds most expensive personal computer
You would have to seriously up-spec a MacBook Pro for it to make the list. For example if you chose the M3 Max (most expensive that they make) and upgrade to the 16 core CPU and 128 Gb of unified memory, then it would just barely appear on the top 15 list https://luxatic.com/most-expensive-pcs/ . If you had said Mac Pro (M2 Ultra with 24 cores, 64 Gb of unified memory) then you would at least be more legitimately on the list.
Walter Roberson
Walter Roberson le 3 Déc 2023
Here is a flow-chart of working with Apple:
Is it a signifiicant security concern? If so Apple will seriously consider fixing it
Is it breaking documented behaviour and is something that Apple relies on for its own recent programs? If so, Apple will seriously consider fixing it and documenting that it did so.
Is it breaking undocumented behaviour and is something that Apple relies on for its own recent programs? If so, Apple might hack around it or might introduce new undocumented behaviour to deal with it or might fix it.. the public will probably never know other than "It started working for Apple programs"
Is it breaking documented behaviour and is something that Apple relies on for older programs? If so it is a toss-up as to whether Apple drops the older software or replaces the older software or just stops documenting the behaviour and stops caring about it
Is it breaking undocumented behaviour and is something Apple relies on for older programs? If so it is a toss-up as to whether Apple drops the older software or replaces the older software
Is it breaking documented behaviour and is something Apple does not rely on? If so then if one of its official channel partners is having problems with it, then Apple will seriously consider fixing it; otherwise it is a toss-up as to whether Apple will fix it, or just sit on it, or just undocument the behaviour
Is it breaking undocumented behaviour and is something Apple does not rely on? If so then if one of its official channel partners is having problems with it, then Apple might consider fixing it, but otherwise will tell you Tough Luck, Don't Do That.
Where does this MATLAB problem fit into this? Answer: it is in the Apple "Tough Luck, Don't Do That!" category.
geofo
geofo le 3 Déc 2023
Dear Walter,
This problem existed at least from 2020 on Apple computers with different OSs that existed at that time. Proof:
So Mathworks was not able to fix this problem in 4 years. Reason: technical mediocrity.
Yes, your list of what Apple is willing to fix shows the point: Apple does not care if users cannot use the computer after buying an expensive program.
Your calculation for the price of Matlab is not correct: Many engineers are using about 20 toolboxes in Matlab, calculate again what does this mean!
Walter Roberson
Walter Roberson le 3 Déc 2023
The only engineers I have seen using "about 20 toolboxes" are people doing some FPGA / HDL work.
It is relevant to ask whether the same functionality is offered by competing mathematical systems; if not then price comparisons are not meaningful.
The R2020b was traced to changes Apple made to the Accessibility interface. A number of different manufacturer's software were impacted. It was traced to a flaw in the notification system that permitted indefinite notifications -- application #1 would receive an accessibility notification, application #2 would receive notification that application #1 had expressed an interest in the notification, application #1 would receive notification that application #2 had expressed interest in the notification, and around and around they would go.
Apple's response was more or less to say, "Sure, the way programs handled notifications was reasonable considering the API, and it worked well until now, but we never promised it would work that way, so we aren't going to bother to fix the problem: you need to redesign your notification handling code completely, and you will not be able to do half of the things you used to do, but that's what you get for playing 'Apple May I' instead of paying us a lot to lock in some behaviour"
Apple, "Hah! We only double-dog-dared pinky-promised not to change this! It's your fault for not knowing to get a double-dog-dared triple-pinky-promise!"
geofo
geofo le 3 Déc 2023
Modifié(e) : geofo le 3 Déc 2023
The 15 toolboxes I use cost today $25450 USD (I restrained myself since I would need some more, to make me happy with compilers and parallel server the total would be at about $50000 USD). A Mac Pro Tower with display cost 17200 USD and in your list would be among the most expensive 8 computers. Note that the Mac Pro is a standard commercial computer while your list has special gaming computers. All this is ruined by clicking on the red x of a window which freezes Matlab on Mac and you lose all data.
Matlab has also other ludicrous problems of this type, for example one cannot search in all files (the entry line is grey) on Mac and one cannot enter installation data under Linux, like email and password, the entry is not accepted (I learned how to go around these problems). This was going on for at least one year, I wrote to Mathworks and they cannot fix these problems either. I have also a list with algorithm errors. I understand that algorithm errors might happen, but I don't understand why I cannot enter a password in a field or click on an x to close a window. This is just poor software from the Matlab team, it is hard to argue against this conclusion!
geofo
geofo le 3 Déc 2023
Walter, thank you for the information about Accesibility related problems. At least I understand this.
Walter Roberson
Walter Roberson le 9 Déc 2023
A Mac Pro Tower with display cost 17200 USD
Apple Pro Display XDR (32 inch, 6K resolution): $US5000
Apple Mac Pro Tower: base price $US7800
So you are doing 17200 - 5000 - 7800 = 4400 worth of upgrades to the model. To get there you have to go for the 76 core GPU (M2 Ultra) upgrade (instead of regular 60 core GPU), 192 GB of unified memory, 8 TB of storage, and add the upgrade to have wheels on the frame.
In other words, to get to that price, you have to choose the most expensive version of everything that Apple offers on that device (but supply your own keyboard.)
Note that the Mac Pro is a standard commercial computer while your list has special gaming computers
Be honest: a Mac Pro with those specifications is custom-built, and effectively is a gaming computer.
And since the display is independent of the computer, merely offered by the same manufacturer, you cannot reasonably include it in saying that the computer is the most expensive. The Mac Pro is not even marketted as a PC: it is a workstation.
For the same specifications that added up to $US12200 above, you can get the Mac Studio for $US8800. The difference, according to tech journalists, is that the Mac Pro has several PCIe expansion slots, and that the SSD in the Mac Pro can in theory be upgraded. And, of course, that you cannot get the wheels for the Mac Studio.
Walter Roberson
Walter Roberson le 9 Déc 2023
You can put together Dell towers with much higher prices. For example about $US11500 for a graphics card upgrade on a Dell 7920 Tower.

Connectez-vous pour commenter.

Plus de réponses (20)

Ahmed Harbi
Ahmed Harbi le 29 Oct 2023

6 votes

Hello, the issue is not with the JAVA JDK, it's with the XCode version 15.0 with macOS Sonoma.
You can find in apple silicon requirements MATLAB is supported with XCode 14.0 with macOS Ventura. https://www.mathworks.com/support/requirements/apple-silicon.html
From the call stack the system is calling dylib files from /usr/lib/system "libsystem_platform, and libsystem_pthread". which are not comaptiable with the requirements for MATLAB.
Nothing can be done for now, either MATLAB get an update for XCode 15, and macOS Sonoma. Or you can downgrade your macOS version.

7 commentaires

Ahmed Harbi
Ahmed Harbi le 29 Oct 2023
Kindly note that downgrading your macOS version is not an easy task. You need to backup your data, and completely erase you mac, then reinstall the required macOS, and reinstall all of your data and programmes.
So, personally I recommend ignoring the crash report from MATLAB completely, as the software is still funtional even with the crash report. And wait for MathWorks to provide an update.
Walter Roberson
Walter Roberson le 29 Oct 2023
Having a backup before attempting anything like that is always a good idea.
If you are downgrading from a recent MacOS version to the one immediately before it, then you do not need to erase everything: you can instead have it overwrite just the APFS volume that holds the operating system: it should not need to erase your data.
If you have your time machine backups on an APFS volume then that requires a fairly recent version of MacOS, and you could possibly run into problems trying to restore off of it to a previous version of MacOS that did not support those.
john
john le 1 Nov 2023
I second this. Looks it's working on Sonoma with xcode 14. However, I'm wondering how painful it is to downgrade xcode from 15 to 14 and if it's not restricted.
Walter Roberson
Walter Roberson le 1 Nov 2023
@john xcode major versions are specific to MacOS releases. You cannot downgrade xcode to 14 without downgrading MacOS.
john
john le 1 Nov 2023
@Walter Roberson Thanks. OK... So, we have to wait for the update from MathWorks.
Jinbo Zhang
Jinbo Zhang le 2 Nov 2023
Modifié(e) : Jinbo Zhang le 2 Nov 2023
In that page, seem Xcode only related to compilers. Why it will have influence on gui usage? I compile spm c code, it is working just fine with Xcode 15. Besides, call stack report here is not a typical bug faced in Sonoma. Most of the bug reported in these coments is about matlab hangs when press X to a simple figure. And if you just open matlab in terminal with -nodesktop option, it can be solve temporally, Seem jdk should be part of the source of this bug. Interestingly, on one of my mac air which never install matlab, I fresh install matlab on it, it work smoothly.... no hang, no crash, just weird...
David
David le 6 Fév 2024
Modifié(e) : David le 6 Fév 2024
It's intriguing how different environments can impact software behavior. While Xcode's influence on GUI usage might not be immediately apparent, its role in handling compilers could indirectly affect performance. It's worth exploring potential interactions with JDK and other dependencies to troubleshoot issues like MATLAB hangs which seem to vary across setups.

Connectez-vous pour commenter.

geofo
geofo le 24 Jan 2024
Modifié(e) : the cyclist le 24 Jan 2024

2 votes

Apple released today (24 Jan 2024) a new vesion of Sonoma (14.3) and with this new version I can close plots in Matlab without problems. I tested this on 4 Mac computers, all work.

2 commentaires

the cyclist
the cyclist le 24 Jan 2024
In limited testing, this Sonoma update has fixed the problem for me, too. Fingers crossed!
Zhenhao Zhou
Zhenhao Zhou le 24 Jan 2024
Same here! 14.3 solved all the figure-related issues!

Connectez-vous pour commenter.

Alfarizy
Alfarizy le 25 Oct 2023

1 vote

I think i figured it out how to fix this problem. It seems like there is a crashed happen on the java. It can be because you have multiple JDK/JRE installed on your mac.
What I did to fix this, I uninstalled all of my JDK/JRE according to this following instruction https://www.java.com/en/download/help/mac_uninstall_java.html and also do the following after you did the instruction on the link I provided.
Uninstalling the JDK on macOS
To uninstall the JDK on macOS, you must have Administrator privileges.
Note: Do not attempt to uninstall Java by removing the Java tools from /usr/bin. This directory is part of the system software and any changes will be reset by Apple the next time that you perform an update of the OS.
  1. Go to /Library/Java/JavaVirtualMachines.
  2. Remove the directory where the JDK is installed by running the rm command as a root user or by using the sudo tool:$ rm -rf jdk-1.8.jdk
After you have done both two steps above, restart your mac, and download then install Amazon Corretto 8 from Matlab website. Restart your mac, and open your MATLAB_R2023B

11 commentaires

@Alfarizy, I'd be curious the result of the following test for you, if you don't mind. Execute the following code from the Command Window (not by putting them in a file and executing the file):
figure
scatter(rand(7,1),rand(7,1))
Then, try to close the resulting figure by using the X in the figure window (not by using the close command).
Does the figure close normally, or does MATLAB hang?
dim-ask
dim-ask le 25 Oct 2023
@the cyclist I did all the process but still matlab hangs when I press X to a simple figure so apparently it does not solve that. But if somebody has a different experience I would like to know.
I am waiting for mathworks people to come back to me, they suggested to remove accessibility permissions from other apps but this did not help either. Anybody here made it work somehow? I am afraid we will just have to wait for some OS update, it is beyond frustrating. I have to use the "new desktop" which is a good idea, but its current state is not for serious work (no custom shortcuts? wtf).
超恒
超恒 le 25 Oct 2023
Thanks, but, if the JDK/JRE is need by other applied, since I can't uninstall it , how to fix this problem ?
超恒
超恒 le 25 Oct 2023
@dim-ask I have update to the macos 14.1, crashing still happen. I have to used "new desktop" too.
超恒
超恒 le 25 Oct 2023
@Alfarizy But the problem is that on older versions of macos, these jdk will not cause Matlab to crash. My jdk will not affect the running of the Matlab program. It is difficult to accept the fact that to run Matlab, I must delete my other java development environment.
@超恒 The answer below suggest this, I guess in the second step you set which environment matlab should use.
But I guess you can just run
version -java
inside matlab to see which environment matlab uses. But as I have the same issue without other jvms installed, that most probably does not solve anything
Maybe you can run the following command from a Terminal (not MATLAB). This command will set MATLAB to use the specified (Amazon Corretto) Java, even if there is no other jvms.
<matlabroot>/bin/matlab_jenv <path to Java jre>
Aceson
Aceson le 27 Oct 2023
what is the root dir for matlab? I only have matlab app sitting in my desktop...
Aceson
Aceson le 27 Oct 2023
@Aceson The default path is
/Applications/MATLAB_R2023b.app
Aceson
Aceson le 28 Oct 2023
@Pengyu Chen Oh I meant <matlabroot>/bin/matlab_jenv this path. Where do I find this matlab_jenv

Connectez-vous pour commenter.

Jinbo Zhang
Jinbo Zhang le 28 Oct 2023

1 vote

Seem reinstall or reset Open-JRE have not solve all problem. Matlab also hang up, when ploting, editing, add external display, open gui or appdesign in SOMETIME, hard to predict. Both of my mac mini, mac air, and mac studio is in such condition. Maybe it is not a right time to use MATLAB2023b with Sonoma. This is a prerelease state not release state!
Matteo Savoia
Matteo Savoia le 1 Nov 2023

1 vote

Both R2023a and R2023b crash on my Intel MacBook Pro (late 2009) with Sonoma. With previous macOS version it worked fine.
I have also installed Amazon Corretto 8 but nothing changed.
I do not think it is related to the processors architecture (since I am on an Intel i9 and have the same issue).
I have to stick with the Windows 11 version for the time being..

3 commentaires

Weizhe Chen
Weizhe Chen le 5 Nov 2023
Does R2023b v23.2.0.2409890 Update3 solve the probelem?
john
john le 6 Nov 2023
@Weizhe Chen Unfortunately no. Let's hope Update 4 or Matlab 2024a fixes the issue.
Kristofer
Kristofer le 6 Nov 2023
I was able to get it work on my M2 Macbook Pro on Sonoma by uninstalling the Oracle JRE and then installing Amazon Coretto 8

Connectez-vous pour commenter.

Hans Scharler
Hans Scharler le 4 Déc 2023

1 vote

MathWorks is currently aware of the following issues when running MATLAB on macOS Sonoma:
1. MATLAB crashes when using an Individual or Designated Computer license
Due to a bug, MATLAB crashes after a minute or two. For more information, see this article.
2. MATLAB crashes when using Oracle Java on Apple Silicon
When launching the Apple Silicon version of MATLAB, MATLAB defaults to a previously installed Oracle Java and crashes. For instructions on how to point MATLAB to Amazon Corretto 8, see this article.
3. The Intel version of MATLAB crashes when generating a C++ MEX file.
This crash occurs after MEX is invoked. For more information and a workaround, see this this article.
4. Chinese characters in MATLAB UI
When the Chinese language is present as a secondary language on the machine, portions of the MATLAB UI display Chinese characters even when preferred locale is set to English. For more information, see this article.

3 commentaires

greg wurtz
greg wurtz le 8 Déc 2023
I have a designated license on MacOS 14.1.2 on an M2 CPY (2023 Mavbook Air) and everythiung is working well. No crashes manipulating figures, etc.
David Fedida
David Fedida le 13 Déc 2023
MATLAB crashes after a few program runs for me 2023a or 2023b using OS Sonoma, it was fine using Big Sur. I have an Intel I7 MacPro 2019. Interestingly, it only crashes if I try and close a figure that the program plots. It will close one or two plots and the next time it locks up. So, I can use MATLAB if I don't close any figures unitl I have finished my programming, Any ideas how to fix this?
Rodrigo
Rodrigo le 14 Jan 2024
i found a way to close it without crashing, instead of closing with the red x try closing it with cmd + w which is the fast way to close a window, it worked for me :)

Connectez-vous pour commenter.

geofo
geofo le 23 Jan 2024

1 vote

Hi Simone! I am not working at Matlab, I am just a user like you. Sorry to tell you that this problem persisted for a very long time now (some years), so it is unlikely Matlab and Apple will fix this in the following days. You need to find some other solution to fix your project. I know two solutions: (1) write in the startup.m file the two lines from the post above or (2) buy a Linux / Windows computer and install Matlab on it. Good luck!

2 commentaires

xinhui li
xinhui li le 23 Jan 2024
Could you please show me the path of startup.m? There are 3 startup.m in my laptop.
geofo
geofo le 23 Jan 2024
In Mac computers it should be under Documents/MATLAB/. You can check in Matlab "Home" tab, click on "Set Path" icon and check the first path in the list, this is it. If there is no startup file under the directory, make one. If you are still unsure which startup file is Matlab using among those you have, add a line to each of the three files like disp("This is number 1"), disp("This is number 2"), etc.

Connectez-vous pour commenter.

Pengyu Chen
Pengyu Chen le 26 Oct 2023

0 votes

When you installed MATLAB R2023b for Apple silicon, it may have inherited Java settings from a previous release that are not compatible with native MATLAB for Apple silicon. Amazon Corretto Java 8 is the only officially supported JRE for MATLAB on Apple silicon. For further information, you can check the following link:

5 commentaires

Valtar
Valtar le 26 Oct 2023
This solution did not work for me :(
Pengyu Chen
Pengyu Chen le 27 Oct 2023
What's your jdk version?
Weizhe Chen
Weizhe Chen le 3 Nov 2023
This solution did not work for me either :(
超恒
超恒 le 18 Nov 2023
This solution did not work for me either :(
Pengyu Chen
Pengyu Chen le 18 Nov 2023
So wierd :(

Connectez-vous pour commenter.

Jinbo Zhang
Jinbo Zhang le 28 Oct 2023

0 votes

I found if you use apple remote desktop to access your Desktop, and MATLAB is just on your screen. MATLAB will be hang up.................
greg wurtz
greg wurtz le 2 Nov 2023
Modifié(e) : greg wurtz le 3 Nov 2023

0 votes

Hello,
I installed 2023b under Sonoma on a Mac with an Intel chip and it has not crashed yet. However, I also am also running the same config on a Mac with an M2 chip (this is another install of 2023b for Apple Silicon). This one launches and processes code but eventually freezes.
addition on 11/3 12:07 EST: Marlab 2023b freezes using the M2 platform only when plotting as far as I can tell.

5 commentaires

Weizhe Chen
Weizhe Chen le 3 Nov 2023
To my understanding, this bug is related to MacOS 14, independent of CPU.
greg wurtz
greg wurtz le 3 Nov 2023
I just double checked and I cannot get the version working on Intel to crash.
greg wurtz
greg wurtz le 6 Nov 2023
Looking into this a bit further, Matlab is not crashing unless I am trying to manually close a figure. Closing a figure from the command window is not a problem.
the cyclist
the cyclist le 8 Nov 2023
@greg wurtz, I learned from MW support that if you have the focus on a different window (i.e. click on literally any other window), you can successfully manually close a MATLAB figure window.
It's a pretty annoying work-around, but it does seem to work for me.
greg wurtz
greg wurtz le 8 Nov 2023
this works indeed. Thanks!

Connectez-vous pour commenter.

junyi
junyi le 8 Nov 2023

0 votes

hey bro,i had the same question .My macos system is 14.1,i unload matlab firstly.Then check https://www.mathworks.com/support/requirements/apple-silicon.html you will find you need download java 8 and Amazon Corretto 8. And you should know that some of products are not suitable for macos ,so just download Matlab ,and click on the matlab icon,you will find you can open it .Good luck!!!

2 commentaires

greg wurtz
greg wurtz le 8 Nov 2023
that is not solving the problem.
junyi
junyi le 9 Déc 2023
check whether u download right version of java or Amazo Corretto.Then try again.
Sometimes ,maybe the file was damaged when downloading, but the chance is tiny.

Connectez-vous pour commenter.

PD
PD le 8 Nov 2023

0 votes

I just found out that Turning off the Display contrast in Accessibility -> Display may solve this problem, just set the Display contrast to normal and restart the mac, and then the Matlab will no more freeze after turning off the figure.

4 commentaires

Walter Roberson
Walter Roberson le 8 Nov 2023
!!
超恒
超恒 le 18 Nov 2023
my setup is always normal, problem still
灵通 仲
灵通 仲 le 4 Déc 2023
how to set?
the cyclist
the cyclist le 11 Déc 2023
Just as another data point on this, MathWorks support team worked a lot with me on "It's an Accessibility issue", and that route never solved the problem for me.

Connectez-vous pour commenter.

David
David le 26 Nov 2023

0 votes

Oh, that's quite a rollercoaster! It's awesome that Matlab 2023b was running smoothly on your macOS 13.6. The decision to update to Sonoma, however, seems to have introduced a hiccup with Matlab crashing on launch. It's always frustrating when an upgrade leads to unexpected issues. The silver lining is that you're not alone in this, with similar reports on Stack Overflow. Here's hoping the community can pool its expertise to find a solution, and you'll soon have Matlab running seamlessly on Sonoma. Fingers crossed for a quick resolution!

2 commentaires

john
john le 26 Nov 2023
Dear @David,
No matter how expert the community is, only MathWorks has the source code and can give the proper patch for this bug.
However, the community has its solutions :D and you can find a fix for this bug somewhere on the internet. I hope that MW finds it soon and releases it in their 5th update. fingers crossed!
David
David le 27 Nov 2023
Sure we hope so this issue sloved soon!!

Connectez-vous pour commenter.

Touraj Tajbakhsh
Touraj Tajbakhsh le 11 Déc 2023
Here is a workaround to prevent MATLAB from hanging when closing or docking a figure. Please insert the following code into your startup.m file:
% avoid hangs when closing a figure
set(groot, 'defaultFigureCloseRequestFcn', 'close(gcf)');
set(groot, 'defaultFigureWindowStyle', 'docked');
warning('off', 'MATLAB:close:RecursionOnClose');
% Additional settings for docked figures to prevent hanging
set(groot, 'defaultFigureDockControls', 'on');

2 commentaires

Xiliang Luo
Xiliang Luo le 11 Déc 2023
Does not work. Matlab needs to get a fix or new release.
xinhui li
xinhui li le 23 Jan 2024
Which startup.m? Could you please show me the path?

Connectez-vous pour commenter.

geofo
geofo le 11 Déc 2023

0 votes

A variant of the suggested code shown below worked for me. The question is still why nobody at Mathworks is able to fix this problem for 3 years now if it just means two lines of code?
set(groot, 'defaultFigureCloseRequestFcn', 'close(gcf)');
warning off MATLAB:Figure:RecursionOnClose;

2 commentaires

David Fedida
David Fedida le 14 Déc 2023
This worked for me too
Binod
Binod le 17 Déc 2023
does not work this method in MacOS 14.2 sonoma, M1, 8 GB

Connectez-vous pour commenter.

Binod
Binod le 17 Déc 2023

0 votes

Same problem with me ... tried multiple options, but useless!
OS: macOS Sonom 14.2
Chip: M1
Matlab R2022b
Issue: Close a figure by clicking the red cross on the figure, matlab will freeze and unresponsive.

1 commentaire

I have those problems on OSX 14.5 Sonoma on Mac and Intel and with different Matlab version on some days with slow internet connections. using matlab is not possible on those days at all. I noticed that the two mentioned lines have to be modified to give 'whomever' some time to react.
set(groot, 'defaultFigureCloseRequestFcn', 'pause(0.05); close(gcf)'); % PAUSE!
warning off MATLAB:Figure:RecursionOnClose;
Inserting the pause solved it on my mac immediately

Connectez-vous pour commenter.

geofo
geofo le 17 Déc 2023

0 votes

Hi Binod! I uderstand your frustration as I stopped using Mac after I had this same problem each time Mac Sonoma 14 version was updated. I saw in your message after you posted it (got email from Maltabl) that there is a new Mac Sonoma Version 14.2, I had 14.1.2, So I updated all my Mac computers to see what happens. My Macs are as follows:
Mac Air M1, 8 GB
MacMini M1, 16 GB
Macbook Pro 16" with I9, 16 GB
MacBookPro 16" with M1, 32 GB
After the update all of them worked well with Matlab with the two lines added in startup.m I wrote about, Matlab is not freezing anymore:
set(groot, 'defaultFigureCloseRequestFcn', 'close(gcf)');
warning off MATLAB:Figure:RecursionOnClose;
This means it must be something special with your setup. Have you installed the Java amazon-correto? Have you installed the Matlab version for M-processors? Sorry, but I don't have more advices except you can do a favour to yourself and buy a Dell with a multi-core CPU, install Matlab on it and it will work like a charm. I was never a fan of Microsoft Windows, but it works extremely well these days. After I made the change, I didn't use Mac anymore. Good luck!

2 commentaires

Binod
Binod le 18 Déc 2023
Problem persists even with this
dim-ask
dim-ask le 23 Jan 2024
wow this seems to have fixed my problem! Thank you!
Is there any explanation for this?

Connectez-vous pour commenter.

Zhenhao Zhou
Zhenhao Zhou le 24 Jan 2024

0 votes

Updating to the newly released macOS 14.3 has solved all figure UI related issues!!!! Can close figures normally, and editing figures using property editor is also functioning well! I think Apple has finally solved this issue(s) that has been there for years!

1 commentaire

James Ganong
James Ganong le 1 Mar 2024
I found a way that works for me using the prerelease of MATLAB 2024a and Amazon Corretto 11.
Here are the details:
With MacOS Sonoma 14.3.1 on Apple Silicon and MATLAB 2023b I was getting the following messages, and MATLAB would apper to hang:
objc[1675]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x23c196340) and /Applications/MATLAB_R2023b.app/bin/maca64/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib (0x108959e70). One of the two will be used. Which one is undefined.
CodeCache is full. Compiler has been disabled.
Try increasing the code cache size using -XX:ReservedCodeCacheSize=
I tried MATLAB 2024a prerelease, and got a similar message and hang:
jeg@barberfish cafe_dive % /Applications/MATLAB_R2024a.app/bin/matlab
objc[1823]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x23c196340) and /Applications/MATLAB_R2024a.app/bin/maca64/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib (0x10c859e70). One of the two will be used. Which one is undefined.
CodeCache is full. Compiler has been disabled.
Try increasing the code cache size using -XX:ReservedCodeCacheSize=
Finally, I unistalled Amazon Corretto 8, following the instructions at https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/macos-install.html#macos-uninstall and installed Amazon Correto 11 setting JAVA_HOME follwing instructions at https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/macos-install.html
and now the last line of the errors messages no longer appears and it is no longer appearing to hang:
% matlab
WARNING: package sun.awt.X11 not in java.desktop
WARNING: package sun.awt.X11 not in java.desktop
objc[2933]: Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x23c196340) and /Applications/MATLAB_R2023b.app/bin/maca64/Frameworks/Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib (0x10d059e70). One of the two will be used. Which one is undefined.

Connectez-vous pour commenter.

James Huth
James Huth le 15 Juil 2024

0 votes

Has this issue now been solved? I had been using R2023b in the Fall 2023/ January 2024 and experienced same crashed when trying to close Simulink figures. Was told by Mathworks tech support that it was an Apple + Java issue.
Am still on R2023b... but also now Mac Sonoma 14.5. Is the problem resolved for everyone using R2023b? I wanted to hold off on jump to R2024a since I still have colleagues using R2023b.

1 commentaire

Tim Lueth
Tim Lueth le 16 Juil 2024
Modifié(e) : Tim Lueth le 16 Juil 2024
I've inserted the two recommended lines of "gofo" 2023-12-17 into startup.m but added a pause of (0.05) that was required on faster Macs. The two code lines solved exactly this problem on all of my Intel Macs and Silicon Macs 2018-2024 using 2024a and independently (!) on the JAVA version.
set(groot, 'defaultFigureCloseRequestFcn', 'pause(0.05); close(gcf)'); % PAUSE!
warning off MATLAB:Figure:RecursionOnClose;

Connectez-vous pour commenter.

geofo
geofo le 15 Juil 2024

0 votes

The problem is solved, I have Matlab 2024b installed on Macs with both Intel and M1 processors and it works.

Catégories

Produits

Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by