Crah problem , matlab not working
Show older comments
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 Comments
Dyuman Joshi
on 3 Oct 2022
It seems like you do not have a working MATLAB license key.
shikha katariya
on 3 Oct 2022
Walter Roberson
on 3 Oct 2022
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
on 3 Oct 2022
Edited: shikha katariya
on 3 Oct 2022
shikha katariya
on 3 Oct 2022
Walter Roberson
on 3 Oct 2022
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
on 3 Oct 2022
Answers (1)
Bhavana Ravirala
on 20 Feb 2023
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!!
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!