graph
graph copied to clipboard
panic: runtime error caused by restore()
I got the following error:
panic: runtime error: slice bounds out of range
github.com/soniakeys/graph.(*negCyc).restore(0xc00051c0d0, 0xc000144380, 0x8, 0x8) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:688 +0x11c github.com/soniakeys/graph.(*negCyc).zL(0xc00051c0d0, 0xc000000000, 0xc0004746a8, 0x1, 0x1, 0x3fe2138300000008, 0x3fe21383aaa28db8, 0x20, 0x82fce0, 0x8, ...) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:710 +0x26e github.com/soniakeys/graph.(*negCyc).step2(0xc00051c0d0, 0x0, 0xc0004746a8, 0x1, 0x1, 0xc0004974a0) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:544 +0xe8 github.com/soniakeys/graph.(*negCyc).all_nc(0xc00051c0d0, 0x0, 0xc0004746a8, 0x1, 0x1, 0xc0004974a0) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:529 +0x131 github.com/soniakeys/graph.(*negCyc).step4(0xc00051c0d0, 0xc00011c240, 0x6, 0x8, 0xc000000000, 0xc0004746a8, 0x1, 0x1, 0x8, 0xc00011c240, ...) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:604 +0x1d3 github.com/soniakeys/graph.(*negCyc).all_nc(0xc00051c0d0, 0x0, 0x0, 0x0, 0x0, 0xc00051c0d0) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:538 +0xe3 github.com/soniakeys/graph.LabeledDirected.NegativeCycles(0xc0003ae240, 0xc, 0xc, 0xc0001843c0, 0xc00015e100) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:492 +0x7a
panic: runtime error: index out of range
github.com/soniakeys/graph.(*negCyc).restore(0xc000078680, 0xc00022e680, 0x7, 0x8) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:689 +0x115 github.com/soniakeys/graph.(*negCyc).step4(0xc000078680, 0xc0000adb80, 0x7, 0x8, 0xc000000000, 0xc00050bcc0, 0x6, 0x8, 0x2, 0xc0000adb80, ...) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:619 +0x42d github.com/soniakeys/graph.(*negCyc).all_nc(0xc000078680, 0x0, 0x0, 0x0, 0x0, 0xc0004abc01) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:538 +0xe3 github.com/soniakeys/graph.(*negCyc).step4(0xc000078680, 0xc0001eff80, 0x6, 0x8, 0xc000000000, 0x0, 0x0, 0x0, 0x0, 0xc0001eff80, ...) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:604 +0x1d3 github.com/soniakeys/graph.(*negCyc).all_nc(0xc000078680, 0x6, 0x0, 0x0, 0x0, 0x1) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:538 +0xe3 github.com/soniakeys/graph.(*negCyc).step4(0xc000078680, 0xc00059e1e0, 0x3, 0x4, 0xc000000006, 0x0, 0x0, 0x0, 0x6, 0xc00059e1e0, ...) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:604 +0x1d3 github.com/soniakeys/graph.(*negCyc).all_nc(0xc000078680, 0x0, 0x0, 0x0, 0x0, 0xc000078680) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:538 +0xe3 github.com/soniakeys/graph.LabeledDirected.NegativeCycles(0xc0003c6240, 0xc, 0xc, 0xc0000e21e0, 0xc00004e0c0) C:/gopath/pkg/mod/github.com/soniakeys/[email protected]/dir.go:492 +0x7a