Clear Filters
Clear Filters

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

3 views (last 30 days)
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?

Answers (1)

Denis Perotto
Denis Perotto on 28 Apr 2024
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.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!