Batch file crashes after processing few files only

I wrote a script to process 1000+ data files. The script does a multitude of things:
loads .MF4 file (about 900 MB each)
Does some processing
generates multiple graphs
Saves graphs to PNG files
The way I process my data is as follows:
Develop script that automates file loading, data processing, and graphs generation
Run the script overnight
The next morning, simply insert the graphs in apowerpoint
The script used to run fine, and each loop takes about 25-30 seconds. Lately however, after 60 or so loops, the script crashes for no apparent reason. Some loops now take over 1000 sec. (I echo back to the screen the loop duration with the tic/toc function)
All files are essentially similar with no major differences, except fror slight variation in time duration (those are time traces)

I tried few things:
Data files on the laptop’s internal storage
Data files on an external SSD (Thunderbolt), very fast
All options I tried so far failed. Any clue as to why the code is failing now? What diagnostics ‘indicators’ can I include to help diagnose …. such as available memory and the like. I thought of copying the SAME file multiple times (yet give it different names), and see precisely at which loop the code failes and whether it always fails at the same loop index.

Again, the code was running fine few days ago, and no clue what has happened.
PS. I’m using Matlab R2024b.I wrote a script to process 1000+ data files. The script does a multitude of things:
loads .MF4 file (about 900 MB each)
Does some processing
generates multiple graphs
Saves graphs to PNG files
The way I process my data is as follows:
Develop script that automates file loading, data processing, and graphs generation
Run the script overnight
The next morning, simply insert the graphs in apowerpoint
The script used to run fine, and each loop takes about 25-30 seconds. Lately however, after 60 or so loops, the script crashes for no apparent reason. Some loops now take over 1000 sec. (I echo back to the screen the loop duration with the tic/toc function)
All files are essentially similar with no major differences, except fror slight variation in time duration (those are time traces)

I tried few things:
Data files on the laptop’s internal storage
Data files on an external SSD (Thunderbolt), very fast
All options I tried so far failed. Any clue as to why the code is failing now? What diagnostics ‘indicators’ can I include to help diagnose …. such as available memory and the like. I thought of copying the SAME file multiple times (yet give it different names), and see precisely at which loop the code failes and whether it always fails at the same loop index.

Again, the code was running fine few days ago, and no clue what has happened.
PS. I’m using Matlab R2024b. I wrote a script to process 1000+ data files. The script does a multitude of things:
loads .MF4 file (about 900 MB each)
Does some processing
generates multiple graphs
Saves graphs to PNG files
The way I process my data is as follows:
Develop script that automates file loading, data processing, and graphs generation
Run the script overnight
The next morning, simply insert the graphs in apowerpoint
The script used to run fine, and each loop takes about 25-30 seconds. Lately however, after 60 or so loops, the script crashes for no apparent reason. Some loops now take over 1000 sec. (I echo back to the screen the loop duration with the tic/toc function)
All files are essentially similar with no major differences, except fror slight variation in time duration (those are time traces)

I tried few things:
Data files on the laptop’s internal storage
Data files on an external SSD (Thunderbolt), very fast
All options I tried so far failed. Any clue as to why the code is failing now? What diagnostics ‘indicators’ can I include to help diagnose …. such as available memory and the like. I thought of copying the SAME file multiple times (yet give it different names), and see precisely at which loop the code failes and whether it always fails at the same loop index.

Again, the code was running fine few days ago, and no clue what has happened.
PS. I’m using Matlab R2024b. loop data processing MATLAB Answers — New Questions

​

Leave a Reply

Your email address will not be published. Required fields are marked *