MATLAB for macOS (Apple Silicon) crashes when certain screen events occur
160 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2023-11-15
编辑: MathWorks Support Team
2024-4-1,13:07
I am using MATLAB R2023b for macOS (Apple Silicon) on my Apple Silicon Mac machine. I have installed Amazon Corretto 8 as instructed. Every time I wake my Mac from sleep or reconnect external monitors, MATLAB crashes. This appears to be the same issue as Bug Report 1382373.
How can I resolve this issue? The crash log has this line shown below:
[ 12] 0x00000002a8d82d4c Java_sun_awt_CGraphicsDevice_nativeGetDisplayMode+00000031 at /Library/Java/JavaVirtualMachines/amazon-corretto-8.jdk/Contents/Home/jre/lib/libawt_lwawt.dylib+126279
采纳的回答
MathWorks Support Team
2024-4-1,0:00
编辑:MathWorks Support Team
2024-4-1,13:07
This is due to a known issue with Java. The most reliable workaround would be to try and close or minimize MATLAB before plugging and unplugging monitors and before letting the machine to go sleep.
Some users have also seen success using Amazon Corretto 11. To set up and use Amazon Corretto 11, follow the steps below:
1) Download and install Amazon Java 11 from the following URL:https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html
2) Execute the following command to identify the location of the installed Java 11:
/usr/libexec/java_home -V
3) Run the following command from a Terminal (not MATLAB). This command will set MATLAB to use the specified Java, even if there is another Java version installed.
./matlab_jenv <path to Java 11 jre>
Note: You may need to navigate to the <matlabroot>/bin directory to execute the command above.
If Amazon Corretto is installed in the default folder, then <path to Java 11 jre> is expected to be /Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home/jre
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!