MATLAB for macOS (Apple Silicon) crashes when certain screen events occur

164 ビュー (過去 30 日間)
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
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 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by