Crah problem , matlab not working

6 次查看(过去 30 天)
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 个评论
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
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!!

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by