How do I kill a windows crash message and the crashed .exe to continue my script?
1 view (last 30 days)
Show older comments
Hello,
I am running a compiled executable from Matlab. The executable is quite buggy (I don't have the code to recompile it) but works 90% of the time. When it crashes, it opens a window indicating that an error occurred when running process.exe. My options are to close or debug (the debug button opens visual studio).
The crash is random, reproducible over a large number of runs, but not predictable.
I usually run process.exe in a loop overnight, thus it is not ideal for the loop to pause until I click 'close' in the error window.
If I run the process in parallel, matlab kills the process in the background and the window never appears. Unfortunately, I cannot always run it in parallel.
I have read a number of other question/answers on this subject but cannot seem to get any of the solutions to work.
OS = Windows 10 Matlab 2016a
I have tried the following:
comnd='process.exe';
try
system(comnd);
catch
warning('process.exe crashed. Retry.');
dos('taskkill /F /IM process.exe');
dos('taskkill /F /IM C:\Windows\SysWOW64\WerFault.exe');
!taskkill -f -im process.exe
!taskkill -f -im WerFault.exe
end
None of the commands in the catch seem to be seen by Matlab. Should I be calling my process with eval() instead of system()? I appreciate any suggestions you may have.
Thank you,
Sarah
0 Comments
Answers (0)
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!