17

Bug introduced in 11.3 and fixed in 12.0


Occasionally, I see a kernel crash with GridGraph[{6,6,6}]. It is not easy to trigger. Sometimes it may require as many as 30 evaluations before it happens, and doing those evaluations in a Do loop doesn't trigger it. It is necessary to evaluate separate inputs manually. At other times, I cannot evaluate GridGraph[{6,6,6}] even once in a new session as it causes a crash every time.

Here's a screenshot (command line) of how it crashed after 20 evaluations (silent exit):

enter image description here

So far I could reproduce this with M11.3.0 on macOS 10.13.4. With M11.2.0 I could not. I would like to know if others can see the crash too, or if it is related to some settings specific to my machine.


Update: Wolfram Support responded and confirmed the problem within hours after reporting it.

If the problem is significantly inconveniencing you, you can use IGMakeLattice from IGraph/M as a workaround. IGMakeLattice was included for other reasons (features not found in GridGraph), but it also makes a good workaround for this issue.

Specifically for the 2D and 3D case you may also use

gridGraph[dims_List, opt : OptionsPattern[]] := IndexGraph@NearestNeighborGraph[Tuples[Range /@ dims], opt]

Update 2:

It seems that HypercubeGraph has a similar crash. My guess is that this is because it might be implemented as GridGraph[ConstantArray[2,n]]. Reported as CASE:4064377.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
  • I have reported (couple days ago) a bug where ChromaticPolynomial@GridGraph[{2, 2, 2}] crashed on v11.3, typically couple evaluations after start up of a kernel. It might be related. It never occurred to me that the bug might actually reside in GridGraph - could it? – kirma Apr 26 '18 at 11:53
  • @kirma It sounds like it might be the same thing. Also, I could only reproduce it with 3D grids, not with 2D ones. Yours is 3D too, also, you are on a Mac too. – Szabolcs Apr 26 '18 at 11:56
  • "Wolfram Kernel for Windows has stopped working" too, after around ~20 repetitions. (V11.3, clould not reproduce in V11.2) – Kuba Apr 26 '18 at 12:00
  • 1
    I tried to reproduce this (... a bit) with 2D grids, but didn't succeed. I didn't try too hard, though. My report was accepted as CASE:4054452. Probably you should refer this to them, the root cause might possibly be a similar memory corruption of sorts. – kirma Apr 26 '18 at 12:01
  • I've got v11.3 on a new computer (win) and can reproduce the problem. FWIW v11.2 on RPi doesn't trigger the crash. – bobthechemist Apr 26 '18 at 12:17
  • 4
    @kirma My report is CASE:4059855. I will tell them that yours may be related. – Szabolcs Apr 26 '18 at 12:19
  • Thanks everyone for the confirmation! – Szabolcs Apr 26 '18 at 12:19
  • It crashed my 11.3 kernel at the third attempt. This was under Windows 7. – Gustavo Delfino Apr 26 '18 at 14:08
  • @Szabolcs same here. crashed every second or third attempt. I am on Windows 10, Mathematica version 11.3 – Ali Hashmi Apr 29 '18 at 11:32
  • 2
    I can't help but note that indeed the devil is in the details :) – yosimitsu kodanuri May 09 '18 at 06:14

0 Answers0