my matlab keeps crashing

matlab keeps crashing when i run a specific code, this code works perfectly on other computers. my computer is not old or anything like that. i do not have eny errors in the code.

4 Comments

ali - what is the code that you are running? Please post the code or a sample that illustrates the crash. Also, please tell us which version of MATLAB you are using and the OS of the computer where the code is causing the crash, and tell us the same for the computer where the code does not cause a crash.
Well, we don't know that you don't have any errors. All we know is what you tell us. But that does not exclude the possibility of errors in your code. Is your code purely MATLAB, or do you have compiled code in there? Nor do we know what you mean by "crashing". Does MATLAB exit? Does it bring down your computer, causing it to reboot? Does it simply freeze things up, or appear to do so? There are a variety of reasons why any of these scenarios might happen.
So without more information, it is impossible to help you very much.
i have R2015a,here is the code. the input and disp texts is in swedish.
the code uses a file that contains a matrix in the size 80*80 and some other vectors and such. i dont think that the code has errors because it runs perfectly on other computers. the error or ¨crash¨appers after the first inputs, is appers when the first calculations is in action. my computer dose not shut down, just matlab, all i get is a window saying that matlab has internal problems.
clear all
clc
res=input('hur många reservoarer vill du ha 1 eller 8:');
knutpunkter=input('hur många knutpunkter vill du ha, 2500 eller 6400:');
if res==1 && knutpunkter==2500
load nat2500.mat
elseif res==1 && knutpunkter==6400
load nat6400.mat
elseif res==8 && knutpunkter==2500
load nat2500r8.mat
elseif res==8 && knutpunkter==6400
load nat6400r8.mat
else
disp('antal resoervoarer eller knutpunkter är felaktiga');
end
%n= trycket
svar = 'ja';
while strcmp(svar,'ja');
n=input('ange tryck:');
if res==1 && knutpunkter==2500
Z=[(-k*L*n^1) (1:2499)*0]';
elseif res==1 && knutpunkter==6400
Z=[(-k*L*n^1) (1:6399)*0]';
elseif res==8 && knutpunkter==2500
Z=[(-k*L*n^1) (-k*L*n^2) (-k*L*n^3) (-k*L*n^4) (-k*L*n^5) (-k*L*n^6) (-k*L*n^7) (-k*L*n^8) (1:2492)*0]';
elseif res==8 && knutpunkter==6400
Z=[(-k*L*n^1) (-k*L*n^2) (-k*L*n^3) (-k*L*n^4) (-k*L*n^5) (-k*L*n^6) (-k*L*n^7) (-k*L*n^8) (1:6392)*0]';
end
tic;
x=A\Z;
x=[x]
toc;
svar = input('vill du testa nytt tryck värde? (ja/nej): ','s');
end
if knutpunkter==2500
Q=reshape(x,[50,50]);
elseif knutpunkter==6400
Q=reshape(x,[80,80]);
end,
surf(X,Y,Q)
If MATLAB itself crashes and says that "MATLAB has encountered and internal error and needs to close", then you really need to read my answer below again.

Sign in to comment.

Answers (2)

Shameem Hasan
Shameem Hasan on 14 Oct 2018

0 votes

How can I solve this crash problem and run my codes?

3 Comments

Did you see my answer above? That's pretty much the only way. The Mathworks can help you get it working, not us non-Mathworks people here.
perhaps because there is NO answer in the above!
The user's (2018) crash dumps all reported
Assertion in void __cdecl `anonymous-namespace'::mwJavaAbort(void) at b:\matlab\src\jmi\javainit.cpp line 1346:
[ 0] 0x000000001111462a C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\win64\libmwfl.dll+00083498
and their hs_error_pid files all reported a java crash in
jogamp.nativewindow.windows.GDI.DescribePixelFormat1
This was a problem that happened to a number of people in different programs, in the 2017 / 2018 time frame.
According to one user, the key was to remove one of AMD driver management programs and install the driver manually; https://community.amd.com/t5/drivers-software/amd-driver-problem/td-p/474097
That fits in with the report at http://forum.salemthegame.com/viewtopic.php?f=10&t=6422 in which a user said that the AMD software was lying about the drivers being completely up to date, and that the problem was fixed for them by updating AMD graphics drivers.
Probable fix for @Shameem Hasan was to update their AMD graphics driver.
@Patrick Vianello: @Image Analyst did provide an answer, above, namely to call Mathworks Support. The volunteers cannot be expected to debug Mathworks crashes -- we do not have access to the source code, and we probably do not run the same hardware and software combinations as the users that have the crash problems.

Sign in to comment.

Categories

Tags

Asked:

on 7 Nov 2015

Commented:

on 2 Nov 2022

Community Treasure Hunt

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

Start Hunting!