필터 지우기
필터 지우기

An external program (.exe) started with "system" terminates early

조회 수: 3 (최근 30일)
Denis Perotto
Denis Perotto 2024년 4월 28일
답변: Denis Perotto 2024년 4월 28일
I have a console application that computes a complicated function and outputs a text file with a resulting value. This application runs for about 8 minutes. I run it repeatedly with system("my.exe") within a surrogateopt function. The problem is that this .exe when started from MATLAB terminates early sometimes as if the process was destroyed (it can happen on first or on 25th iteration, no pattern noticed). When I run the application manually with current surrogateopt parameters, it runs completely fine.
I tried to disable antivirus, but it didn't help, so I guess, it might be an internal MATLAB problem.
Are there any known problems of that kind or any ideas why this might happen?

답변 (1개)

Denis Perotto
Denis Perotto 2024년 4월 28일
In case somebody encounter the same problem. I created an additional RunExe.exe in C# that runs my main my.exe (written in C++) then exits. This RunExe.exe seems to start from MATLAB every time without problems.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by