I have written a
Manipulate code carrying out some very complicated tasks. There is no problem for the first run, but if I click the reset button to reset all variables to their initial states (which is also ok) and click the run button a second time, then it is very likely that the Mathematica kernel will crash during the re-run progress, the frequency for such crash happening is about 9 out of 10 times.
I have spent almost a month trying to track down the source of this problem, but failed. I also asked the Wolfram support team, they suggested to implement the
Quit function in the reset button as a workaround, such that the reset button will make the kernel quit, since the first run is always ok.
Now the problem is, I cannot directly put
Quit inside the button, for by doing this the kernel loses all definiton about the enclosing
Manipulate. So I need the reset button doing two tasks:
- Quit the kernel.
- Make Mathematica automatically re-run the enclosing
I wonder if this is possible?