reported to WRI. ID [CASE:4950759]
I just found a very serious problem in V 13.1. Hoping someone will have a workaround.
I am able to reproduce this each time. V 13.1 on windows 10 pro. All from fresh new Mathematica session started new.
Integrate is called with timeout. Then the result is printed.
When print is directed to console, All of Mathematica shutdown (I do not mean kernel dies, but I mean all of Mathematica dies. The front end, all of it just closes). No error message, nothing. It just disappears from the screen.
When print is directed to the notebook, it works ! No crash.
Here is the code below. I also put a link to the notebook at the end.
Please make sure to SAVE all your work before trying this.
SetDirectory[NotebookDirectory[]]
CurrentValue[$FrontEnd, {"PrintAction"}] = {"PrintToConsole"}
CurrentValue[$FrontEnd, {"MessageOptions", "KernelMessageAction"}] = {"PrintToConsole", "Beep"}
integrand = Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]];
Print["Before calling integrate on ", integrand];
res = AbsoluteTiming[ TimeConstrained[Integrate[integrand, x], 60*3]];
Print["Done! "];
(*Mathematica shuts down when issuing this command*)
Print[res]
Now replacing the above with
CurrentValue[$FrontEnd, {"PrintAction"}] = {"PrintToNotebook"}
CurrentValue[$FrontEnd, {"MessageOptions", "KernelMessageAction"}] = {"PrintToNotebook", "Beep"}
With the rest of the code same, Then it works and no crash
The question is: Why does this happen and is there a workaround? This never happened in 13.01.
Here is a movie
Here is also a link to the notebook
