Java memory error makes Matlab extremely sluggish

4 Ansichten (letzte 30 Tage)
Florent Aguesse
Florent Aguesse am 26 Mär. 2016
Bearbeitet: ahp ahp123 am 2 Mai 2017
So recently (2 weeks or so), Matlab started being extremely slow at time, to the point of being unusable. After some time executing simple commands in a completely clean workspace, it gave the error:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded
And some other times:
Exception in thread "History All Saver" java.lang.OutOfMemoryError: GC overhead limit exceeded
After a long wait and these messages fully displaying with several lines underneath such as:
at java.util.LinkedHashMap.createEntry(LinkedHashMap.java:442)
at java.util.HashMap.addEntry(HashMap.java:888)
at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:427)
at java.util.HashMap.put(HashMap.java:509)
at com.mathworks.mlwidgets.util.productinfo.ProductInfoUtils.pathChanged(ProductInfoUtils.java:136)
at com.mathworks.mlwidgets.util.productinfo.ProductInfoUtils.access$1300(ProductInfoUtils.java:42)
at com.mathworks.mlwidgets.util.productinfo.ProductInfoUtils$PathActionListener.actionPerformed(ProductInfoUtils.java:1055)
at java.awt.AWTEventMulticaster.actionPerformed(AWTEventMulticaster.java:444)
at com.mathworks.jmi.MatlabPath$DeferredActionEvent.dispatch(MatlabPath.java:169)
at com.mathworks.util.QueueEvent$QueueTarget.processEvent(QueueEvent.java:89)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I have looked into them and could not find trace of a code I ran or that I could be responsible for.
In order to fix this issue, I have:
  • Used function created by a fellow Matlab user supposed to clear Java Heap memory.
  • Deleted and reinstalled Matlab for several versions, thinking it could be a compatibility issue
  • Allocated as much Java Heap memory space as possible
With no success.
I don't know what to do at this point and this issue is completely preventing me from using Matlab.
PS: My java log file reads:
Operating System: Darwin 14.5.0 Darwin Kernel Version 14.5.0: Tue Sep 1 21:23:09 PDT 2015; root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
Processor ID: x86 Family 6 Model 69 Stepping 1, GenuineIntel
Host Name: MacBook-Air-de-Florent.local
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "BayeuxServer@212676094"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1870002230-167"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "TimerQueue"
  2 Kommentare
Gautam Mohan
Gautam Mohan am 28 Mär. 2016
You might want to try regenerating your MATLAB preferences directory. Instructions on how to do so can be found here.
Try specifying the heap size changes in your java.opts file (usually in matlabroot/bin/arch). The file should contain only the following lines:
- XX:-UseGCOverheadLimit
- Xmx1024m
Additionally, try unsetting the JAVA_OPTIONS and JAVA_TOOL_OPTIONS in the ~/.bashrc or ~/.bash_profile files.
If that does not work, there may be an issue with your Java installation. Try reinstalling your version of Java.
ahp ahp123
ahp ahp123 am 2 Mai 2017
Bearbeitet: ahp ahp123 am 2 Mai 2017
because of this error I changed my matlab version (2015a to 2016a) and also change the version of java which matlab used to 1.8. I used 2015a for six months and then after each click matlab halt and cpu is busy to much and processing icon comes for every action in bottom of "current folder" for some while. and also keyboard doesn't work sometimes. :(
I did what they said here
By the way I use linux version.
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: GC overhead limit exceeded at java.lang.String.toCharArray(String.java:2899) at java.util.zip.ZipCoder.getBytes(ZipCoder.java:78) 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 com.jidesoft.grid.TreeTable.expandableRowAtPoint(Unknown Source) at com.jidesoft.grid.TreeTable.handleMouseEvent(Unknown Source) at com.jidesoft.grid.TreeTable$ExpandMouseListener.mousePressed(Unknown Source) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:279) at java.awt.Component.processMouseEvent(Component.java:6530) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at com.mathworks.widgets.grouptable.GroupingTable.processMouseEvent(GroupingTable.java:1230) at com.mathworks.mlwidgets.explorer.widgets.table.FileTable.processMouseEvent(FileTable.java:294)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Call MATLAB from Java finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by