Compatibility issue between Simulink and Mac OS High Sierra

I downloaded Matlab r2017b after upgrading my Mac to High Sierra, as Mathworks advise. But know Matlab is freezing when I start Simulink (opening a project, without even running it most of the time). I get a bunch of Exception Errors in the Command Window :
Exception in thread "Socket Reader" java.lang.OutOfMemoryError: Java heap space
at java.awt.image.DataBufferInt.<init>(DataBufferInt.java:75)
at java.awt.image.Raster.createPackedRaster(Raster.java:467)
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(DirectColorModel.java:1032)
at java.awt.GraphicsConfiguration.createCompatibleImage(GraphicsConfiguration.java:186)
at com.teamdev.jxbrowser.chromium.swing.internal.MemoryImage.updatePixels(Unknown Source)
at com.teamdev.jxbrowser.chromium.swing.internal.WidgetView.a(Unknown Source)
at com.teamdev.jxbrowser.chromium.swing.internal.u.onMessageReceived(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.o.a(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.o.onMessageReceived(Unknown Source)
at com.teamdev.jxbrowser.chromium.internal.ipc.SocketChannelReader.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "Explorer NavigationContext request queue" Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:68)
at java.lang.StringBuilder.<init>(StringBuilder.java:89)
at com.mathworks.matlab.api.explorer.FileLocation.<init>(FileLocation.java:89)
at com.mathworks.matlab.api.explorer.FileLocation.getParent(FileLocation.java:126)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.resolveLocation(VirtualFileSystem.java:285)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.getTarget(VirtualFileSystem.java:276)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.resolveLocation(VirtualFileSystem.java:285)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.getTarget(VirtualFileSystem.java:276)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.resolveLocation(VirtualFileSystem.java:285)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.getTarget(VirtualFileSystem.java:276)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.isMountPoint(VirtualFileSystem.java:239)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.toExternalEntry(VirtualFileSystem.java:324)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileSystem.toExternalEntry(VirtualFileSystem.java:319)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileList$MountingReceiver.receive(VirtualFileList.java:106)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileList$MountingReceiver.receive(VirtualFileList.java:95)
at com.mathworks.util.AsyncReceiverUtils$3.receive(AsyncReceiverUtils.java:77)
at com.mathworks.mlwidgets.explorer.model.realfs.StatToEntryAdapter.receive(StatToEntryAdapter.java:37)
at com.mathworks.cfbutils.NativeCfb.listFiles(Native Method)
at com.mathworks.mlwidgets.explorer.model.realfs.RealFileList.readFilesAndFolders(RealFileList.java:47)
at com.mathworks.mlwidgets.explorer.model.overlayfs.OverlayFileList.readFilesAndFolders(OverlayFileList.java:52)
at com.mathworks.mlwidgets.explorer.model.vfs.VirtualFileList.readFilesAndFolders(VirtualFileList.java:57)
at com.mathworks.mlwidgets.explorer.model.table.UiFileList.readAndUpdateCache(UiFileList.java:360)
at com.mathworks.mlwidgets.explorer.model.table.UiFileList.access$500(UiFileList.java:45)
at com.mathworks.mlwidgets.explorer.model.table.UiFileList$6.run(UiFileList.java:325)
at com.mathworks.util.RequestQueue.execute(RequestQueue.java:129)
at com.mathworks.util.RequestQueue.access$000(RequestQueue.java:25)
at com.mathworks.util.RequestQueue$2.run(RequestQueue.java:79)
at java.lang.Thread.run(Thread.java:745)
Is anyone having that problem too? What did you do to solve this problem? I really need Simulink and don't want to downgrade to Sierra again...
Thanks for your time!

5 commentaires

Have you tried going into MATLAB Preferences -> General -> Java Heap Memory, and making that larger? After you do that, you will need to restart MATLAB.
I did it and put the maximum Java Heap Memory I could, and it is a little bit better, I don't have the error anymore in the Command Window, but it is still struggling when I open Simulink. Now I get an OutOfMemory warning in the Diagnostic Viewer of Simulink, and I still can't run Simulink models.
Warning: A Java exception occurred trying to load the SimulinkStudio/callbacks/simulationInteractiveMultiRunCB class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.zip.ZipCoder.getBytes(ZipCoder.java:80)
at java.util.zip.ZipFile.getEntry(ZipFile.java:310)
at java.util.jar.JarFile.getEntry(JarFile.java:240)
at java.util.jar.JarFile.getJarEntry(JarFile.java:223)
at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:1042)
at sun.misc.URLClassPath.getResource(URLClassPath.java:239)
at java.net.URLClassLoader$1.run(URLClassLoader.java:365)
at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.mathworks.jmi.OpaqueJavaInterface.findClass(OpaqueJavaInterface.java:137)
I think you should probably contact Mathworks for this.
I understand that you have already tried increasing the java heap memory available for MATLAB.
The other error 'GC overhead limit exceeded' can occur when the Java Garbage Collector has exceeded its overhead limit.
To disable the overhead limit, add the following line to the java.opts file:
-XX:-UseGCOverheadLimit
If a java.opts file already exists on your MATLAB path, add the above mentioned line to this file. If the file does not currently exist on your machine, please create a text file called java.opts and place this file in the location:
$MATLABROOT/bin/$ARCH
where, $MATLABROOT is the MATLAB root directory obtained by typing the following at the MATLAB Command Prompt:
matlabroot
and $ARCH is the output of typing the following at the MATLAB Command Prompt:
computer('arch')
Hope this helps.
Ankitha Kollegal Arjun, please copy this to the Answer section so people can vote for it.

Connectez-vous pour commenter.

Réponses (1)

I understand that you have already tried increasing the java heap memory available for MATLAB.
The other error 'GC overhead limit exceeded' can occur when the Java Garbage Collector has exceeded its overhead limit.
To disable the overhead limit, add the following line to the java.opts file:
-XX:-UseGCOverheadLimit
If a java.opts file already exists on your MATLAB path, add the above mentioned line to this file. If the file does not currently exist on your machine, please create a text file called java.opts and place this file in the location:
$MATLABROOT/bin/$ARCH
where, $MATLABROOT is the MATLAB root directory obtained by typing the following at the MATLAB Command Prompt:
matlabroot
and $ARCH is the output of typing the following at the MATLAB Command Prompt:
computer('arch')
Hope this helps.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by