How do I kill a windows crash message and the crashed .exe to continue my script?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!