Matlab 2025b become unresponsive after running long iterations
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
The thing seems to get stuck after loading a lot of files.
Despite those files are not kept in the memory.
e.g.,
for i = 1 : 10000
filename = xxxx_i % different file each iteration
data = load(filename);
% then do something with data, and data is updated every iteration
end
and MATLAB becomes unresponsive after running the said code. The behavior is kind of reproducable in different scripts loading different files for different purposes. The common ground is they are all loading a lot of files, and Matlab gets stuck afterwards. The memoery useage is normal.
Appears to be a new issue starting from 2025b, 2025a doesn`t have this behavior.
2 commentaires
Steven Lord
le 22 Oct 2025 à 21:18
Without more details about what is happening during the "% then do something with data, and data is updated every iteration" step, it's likely going to be difficult if not impossible to offer any concrete suggestions.
dpb
le 23 Oct 2025 à 17:38
Modifié(e) : dpb
il y a environ 3 heures
Can you reproduce the symptoms with only
for i = 1 : 10000
filename = xxxx_i % different file each iteration
data = load(filename);
end
this part of the process? If so, could be indicative of not freeing up system file handles and running out of system resources.
Another possibility is that while overall memory use isn't excessive, the constant redefinition of the data variable causes memory segmentation and the system can't find a contiguous memory space of sufficient size.
Do symptoms change if you do forcibly
clear
at the end of the loop before starting the next iteration?
Another perturbation to try to uncover root cause would be to run the loop but just repeating the calculations on the same file to see if it really is related to multiple files being opened or something else inside the calculations is different in new release...
i=1;
filename = xxxx_i % define initial file
data = load(filename); % load data once only for testing
for i = 1 : 10000
then_do_something(data);
end
If the above runs without the symptom, then it would appear to be tied into the file i/o, indeed.
Réponses (0)
Voir également
Catégories
En savoir plus sur Programming Utilities dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!