Bug introduced in 6 or 7 and resolved in 10.2

I have been doing some multi-dimensional numerical integration and noticing that when I try to evaluate certain integrals of functions I have defined, the evaluation stops almost instantly and clears all of my functions without producing an output. Below is a simplified version of the contents of my notebook.


R3[x_?NumericQ, y_?NumericQ, n_?NumericQ] := Exp[-Abs[x - y]/n]*(x/n - y/n)^n;

b[T_?NumericQ] := 1/(T - I);

trans[x_?NumericQ] := x/(1 - x^2);

f[x_?NumericQ, y_?NumericQ, T_?NumericQ] :=  NIntegrate[R3[x, trans[z], 1]*R3[y, trans[z], 1]* Exp[I*b[T]*(x + trans[z])^2 - I*Conjugate[b[T]]*(y + trans[z])^2 + I*T]*D[trans[z], z], {z, 0, 1}, Method -> {"MonteCarlo", "MaxPoints" -> 10^2}];

g[T_?NumericQ] := NIntegrate[Abs[f[trans[x], trans[y], T]]^2*D[trans[x], x]*D[trans[y], y], {x, 0, 1}, {y, 0, 1}, Method -> {"MonteCarlo", "MaxPoints" -> 10^2}];

I have no problems evaluating the function f[x,y,T] at different points (I get the "failed to converge" error message, although it does not affect the evaluation), but when I try to evaluate, for example, g[0], the aforementioned problem of all function definitions getting cleared arises. I have never experienced this problem before and I'm wondering if I am making some silly mistake. Any help would be much appreciated.

  • 2
    $\begingroup$ This is a bug that has been fixed as of version 10.2. $\endgroup$
    – ilian
    Sep 1, 2016 at 22:50

1 Answer 1


The symptom of all symbols being cleared (turning from black to dark blue, then lighter blue on the next evaluation) indicates that the kernel crashed. While some kernel crashes can be induced by the user's unwary experimentation, in many cases it's just a bug. So it is here, as ilian notes in a comment:

This is a bug that has been fixed as of version 10.2.

In general, high-level functions like NIntegrate crashing the kernel is more likely to be a bug in those functions than due to anything the user has done, unless the input is somehow pathological.

  • $\begingroup$ Still, I noted that when memory usage was high, the kernel tended to crash. Mine is MMA 11. Is that some system memory management problem? $\endgroup$
    – Turgon
    Sep 2, 2016 at 7:00
  • 1
    $\begingroup$ @hys.0515 it is possible for the kernel to crash through running out of resources, especially on Linux. I believe the way the Linux kernel deals with processes that consume all memory and still try to allocate more is to kill them, since they make the whole system unusable. $\endgroup$ Sep 2, 2016 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.