Crah problem , matlab not working

hi , every time i open matlab , it windown gets stuck on not responding and alsp gets these errors Pls find the attchmnent
pls give me solution for it, as i have already un install in re installed still facing the issue

댓글 수: 7

Dyuman Joshi
Dyuman Joshi 2022년 10월 3일
It seems like you do not have a working MATLAB license key.
shikha katariya
shikha katariya 2022년 10월 3일
No , i have MATLAB license key
Walter Roberson
Walter Roberson 2022년 10월 3일
The No Available License Keys message might be caused by Java having run out of memory -- the problem might not be the license keys but rather something leading up to the point of validating the license keys.
I do not have any suggestions at the moment as why Java might be running out of memory. Have you configured your own Java version, or are you relying on the default java version ?
One thing you could try is removing any directory C:\Users\YOURUSERNAME\AppData\Roaming\MathWorks\MATLAB\R2021a and then starting MATLAB again. That is the preferences directory; if you had corrupt preferences then that is something that might last through repeated installation.
shikha katariya
shikha katariya 2022년 10월 3일
편집: shikha katariya 2022년 10월 3일
i have also increased the java heap memory but still getting the same error.
will try changing the preference directory , hope it works
should i delete this C:\Users\YOURUSERNAME\AppData\Roaming\MathWorks\MATLAB\R2021a
shikha katariya
shikha katariya 2022년 10월 3일
i have changed the preference but still getting this error
Warning: A Java exception occurred trying to load the LiveAppManager/getAppContainer class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Warning: A Java exception occurred trying to load the
matlab/internal/editor/LiveTaskUtilities/generateScript class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Warning: A Java exception occurred trying to load the
matlab/internal/editor/LiveTaskUtilities/generateSummary class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Warning: A Java exception occurred trying to load the
matlab/internal/editor/LiveAppManager/CHANGED_REQUEST_CHANNEL class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Warning: A Java exception occurred trying to load the LiveTaskUtilities/reset class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Warning: A Java exception occurred trying to load the matlab/internal/editor/LiveAppManager/getFigure
class:
Java exception occurred:
java.lang.OutOfMemoryError: GC overhead limit exceeded
> In connector.internal.fevalMatlab
In connector.internal.fevalJSON
Exception in thread "AWT-EventQueue-0": java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.mathworks.widgets.BusyAffordance.paintEachDot(BusyAffordance.java:413)
at com.mathworks.widgets.BusyAffordance.paintDots(BusyAffordance.java:383)
at com.mathworks.widgets.BusyAffordance.paintAffordance(BusyAffordance.java:366)
at com.mathworks.widgets.BusyAffordance$1.paintComponent(BusyAffordance.java:206)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
Exception in thread "AWT-EventQueue-0": java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "Explorer NavigationContext request queue": java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "AWT-EventQueue-0": java.lang.OutOfMemoryError: GC overhead limit exceeded
Exception in thread "AWT-EventQueue-0": java.lang.OutOfMemoryError: GC overhead limit exceeded
>>
Walter Roberson
Walter Roberson 2022년 10월 3일
You might need to increase the Java Heap Memory https://www.mathworks.com/help/matlab/matlab_external/java-heap-memory-preferences.html -- but if you are receiving the error as soon as you open MATLAB then changing the heap size might not help.
Do you happen to have a startup.m in your path that might be running some function ?
shikha katariya
shikha katariya 2022년 10월 3일
no i cannot find any startup.m file in path

댓글을 달려면 로그인하십시오.

답변 (1개)

Bhavana Ravirala
Bhavana Ravirala 2023년 2월 20일

1 개 추천

Hi Shikha,
This error can occur when the Java Garbage Collector has exceeded its overhead limit.
You can eliminate this error by following the workarounds mentioned below:
1. 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')
2. One may force more Java garbage collection from the command line as well:-
r = java.lang.Runtime.getRuntime();
r.gc;
r.gc;
r.gc;
Running r.gc only once may not activate the object method and hence may need to be used more number of times.
Hope this helps!!

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2021a

질문:

2022년 10월 3일

답변:

2023년 2월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by