Anyone else having issues with MATLAB 2023a hanging after some period of inactivity?

I'm running a Live Script that reads data collected from lab test equipment saved as csv types. I process the data, do some statistical analysis, and plot a number of figures. If I then switch to do something else, and come back to it, if I try to run it again, it doesn't run "right". For instance, I point the script to other datafiles, but the figures in the live script window are still the figures from the old datafiles (even though the script seems to have run). It just doens't update the new figures.
Then, when I try to exit by typing exit so I can relaunch the program, It stays in "busy" mode and never quits. I then have to go to the task manager to end the task.
I've updated my Intel® UHD Graphics driver to version 31.0.101.2125 dated 5/24/2023 and still have the issue. I'm running MATLAB version:
MATLAB Version: 9.14.0.2206163 (R2023a)
MATLAB License Number: 41106910
Operating System: Microsoft Windows 10 Business Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
version R2023b does the same thing, but, I don't remember ever having this issue with R2022.
Is anyone else having similar issues?

5 Comments

Just some shots in the dark, so that someone who does know more can help you. How much RAM do you have? Is this a memory intensive thing? How many CSV files? How many plots? How large are your arrays? Are the plots complicated things themselves?
You say that if you try to run it again there is a problem. But, what if you just had just done something else in MATLAB, rather than re-running the script on a new case? Can you just generate a simple plot, multiply two small matrices, etc? What I'm trying to do is sneak up on the issue, to identify where/when things are going crazy, or, is the craziness already there.
I completely understand where you're coming from. I'll update this post when it happens again with some answers to your questions. in the meantime, this is what I can answer now: I don't think it's particularly memory intensive, but ...
1) total system ram 32GB
2) 66 csv files
3) 5 plots
4) did a 'whos', and added all the bytes used the variables in the workspace: 12157724 or about 12MBytes.
Next time it happens, I'll try generating a sipmle plot, multiplying two small matrices, etc....
Thank you!
Jorge
This may be one of those things where you need to send it in a a problem report, where it will hopefully get the attention of someone who really does know what they are doing.
But it does not seem to be memory, since you have lots, and the variables remaining at the end are not large.
After you run the script, if you clear your workspace, does the problem remain? That is, if you try to reset the environment as much as possible between runs?
You said that if you try to re-run the script, then things crash. But can you execute commands at that point before you rerun the script? Even exit MATLAB at that point?
not sure....the issue is I don't know it will do it until I run the script and then it hangs. Perhaps I can try in the future doing a few things first before running the script after I come back to it after a few hours or so....
Yeah, this is a difficult one to send in a problem report on because I don't know exactly how to recreate it! It just happens, and it seems to be after a long period of inactivity with the program. I'll figure out how to report it.
Thanks!
I am having similar problems. As I work on a live script at some point, I may receive random code warnings and the script runs "wrong." For example, when generating a plot, I will receive a plot previously generated from a different part of the live script and code warnings don't seem to be real. I must use task manager to force quit MATLAB. When I load it up again everything runs properly for a while. My problems started after the recent update.
16 GB RAM, Intel(R) Core(TM) i7-10750H CPU, RO2023a Update 4 (9.14.0.2306882)

Sign in to comment.

Answers (2)

Happens to me sometimes. Like if I and click on MATLAB after not using it for a few hours, it seems to take a while to "wake up" even though I had just been using a web browser with not much delay right before. I figured it was something to do with my computer (only 8 MB with 95% being used) rather than MATLAB. Like the computer had swapped MATLAB out of memory and had to swap it back in or something like that. When I had my 32 GB RAM computer, I don't recall much delay on getting MATLAB to respond.

1 Comment

I need to try and do something else before I rerun the script to see if it is a memory swap, or something else. I think it is something with the graphics card, but I can't prove it yet.
the other thing is that I can't even exit the program when this happens....I need to kill it from the task manager...

Sign in to comment.

Thanks for brining this topic up.
I'm having issues with 2023b hanging all the time ... I haven't correlated it to any particular action like returning to MATLAB after being in another app for a bit, but I will try to become more attuned to the potential cause now. I just had the issue now and all I did was open MATLAB, go to another app, and then come back at which point I had to wait for 30 seconds of 'swirley' ...

2 Comments

I have to wait for 30sec to 1 min (sometimes more) every time I run a script. It's a major pain! I can't seem to find the solution.
Bring up task manager (control-shift-Esc if in Windows) and look at the row for MATLAB. After you start your script, do you see any increase in the CPU usage for MATLAB? How about any of the other apps? Sort the column by CPU usage and try it again and see what the computer is spending all its time on during those 30 seconds.
Put this line
fprintf('Beginning to run %s.m at %s...\n', mfilename, datetime('now','TimeZone','local','Format','HH:mm:ss'));
and this as the last line in your script
fprintf('Done running %s.m at %s...\n', mfilename, datetime('now','TimeZone','local','Format','HH:mm:ss'));
to see exactly when your script starts running after you click the green run triangle button.

Sign in to comment.

Categories

Find more on Scripts in Help Center and File Exchange

Products

Release

R2023a

Asked:

on 9 Aug 2023

Commented:

on 30 May 2024

Community Treasure Hunt

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

Start Hunting!