Hello again, community!
In an earlier post, I mentioned a rather serious memory leak issue with the new FEM package in Mathematica 10. Due to this, I've now been experimenting with launching parallel kernels, doing some computations in them, grabbing the results and then closing them. This way, I can work around the memory leak issue, since any leaked memory is freed once the kernel doing the computations is closed. Of course this also has the added benefit of greatly improving the run time of my code.
However, this is where I ran into another issue. I tried repeatedly executing the following type of code:
LaunchKernels[];
% Insert any parallel computations
CloseKernels[];
However, this tends to crash after a number of repetitions (sometimes as little as 4, sometimes as many as 10-12). When I say crash, I mean that the main kernel of the notebook crashes and gets restarted, stopping all computations and dropping all variables/function definitions/etc.
The computations themselves don't seem to be particularly relevant. Here's a sample code that results in a crash
Do[(LaunchKernels[]; CloseKernels[]; Print[i]), {i, 15}]