MATLAB Answers


desactivation of the "MATLAB system error" dialog box ?

Asked by Terence Acconci on 8 Feb 2013
Latest activity Answered by Jan
on 12 Jun 2019
I'm currently programming a Matlab file (on Windows, with R2008b Matlab) that will be included in a stand-alone PC (i.e. once the program will be started, no human intervention will be possible anymore). This program will have to run during some days, without interruptions. I've already tried to test the code during some hours, but a "segmentation violation" error occurred, after, at least, several hours. When this occurs, a "Matlab system error" dialog box appears, and a click has to be done in order to exit Matlab.
I was wondering if it was possible, when a segmentation violation error occurs, to automatically exit Matlab without having to click on that button. This would be useful for me, because, in that case, it would be possible for Windows to detect the end of the Matlab process, and to re-execute it automatically, as well as the Matlab file (-> no human intervention required).
Thank you in advance for your answers.

  1 Comment

2019 年 6 月 12 日
Was such a feature implemented between R2008 and more recent versions (e.g. R2015b) ?
This dialog box that pauses matlab is quite annoying when wanting to use matlab for continuous testing.

Sign in to comment.

2 Answers

Answer by Jason Ross
on 8 Feb 2013

I don't know the answer to your immediate question, but I'd suggest that you develop a means of monitoring this machine, as well as the program, given how it's going to be running. If it's not MATLAB throwing up a dialog box, it could be something else.
For monitoring the machine, there are a number of packages available such as Nagios and Cacti, in addition to roll-your-own solutions like pinging the host to see if it's still up and responsive.
For the code in MATLAB that's executing unattended, I'd suggest you develop a "heartbeat" method that you can monitor and alert on if the program stops working. An example might be as simple as touching a file every five minutes to let you know the program is still running, and setting up a script that alerts you if it hasn't happened. You might already be putting data down on disk with some regularity, so you could use that, too. You can use a monitoring tool as mentioned above to check for this, or roll-your-own.
Depending on your environment/organization, there might be something in place already.

  1 Comment

2013 年 2 月 8 日
Does a seg fault stop a running timer()?

Sign in to comment.

Answer by Jan
on 12 Jun 2019

I'm running a long test also. The code displays some logging messages every few seconds. A second Matlab session takes a screenshot every minute. If there is no change, the first session is assumed to hang. Now the java awt robot can be used to press the "Cancel" button, but its position depends on the shown error message. It is easier to use taskkill to remove the process.


Sign in to comment.