ondrajz / go-callvis

Visualize call graph of a Go program using Graphviz
https://ofabry.github.io/go-callvis
MIT License
5.85k stars 406 forks source link

callEdge dynamic function call -> n260892: not a function object #53

Closed hikhvar closed 4 years ago

hikhvar commented 4 years ago

Hello, I tried to get a call graph for the net/http package. But I got the following panic. Sadly I run this on some private code so I can not share the input code to reproduce the error.

go-callvis -focus upgrade -group pkg,type -limit net/http git.our.private.net/my/code              :(

Internal panic in pointer analysis:
goroutine 1 [running]:
runtime/debug.Stack(0x24, 0x0, 0x0)
    /usr/lib/go/src/runtime/debug/stack.go:24 +0x9d
runtime/debug.PrintStack()
    /usr/lib/go/src/runtime/debug/stack.go:16 +0x22
golang.org/x/tools/go/pointer.Analyze.func1(0xc08f7c1d68)
    /home/christoph/workspace/GO/src/golang.org/x/tools/go/pointer/analysis.go:227 +0x10b
panic(0x8f87e0, 0xc03cbd78f0)
    /usr/lib/go/src/runtime/panic.go:679 +0x1b2
golang.org/x/tools/go/pointer.(*analysis).callEdge(0xc048133a40, 0xc04b486a20, 0xc03c8bc360, 0x3fb1c)
    /home/christoph/workspace/GO/src/golang.org/x/tools/go/pointer/analysis.go:368 +0x78a
golang.org/x/tools/go/pointer.Analyze(0xc0487bb2c0, 0x0, 0xa7ed40, 0xc03cbd7910)
    /home/christoph/workspace/GO/src/golang.org/x/tools/go/pointer/analysis.go:354 +0x68b
main.doAnalysis(0x0, 0x0, 0xc000024600, 0xc0000200f0, 0x1, 0x1, 0x3, 0x9d67da)
    /home/christoph/workspace/GO/src/github.com/TrueFurby/go-callvis/analysis.go:49 +0x241
main.main()
    /home/christoph/workspace/GO/src/github.com/TrueFurby/go-callvis/main.go:104 +0x156
2019/10/14 14:52:29 internal error in pointer analysis: callEdge dynamic function call -> n260892: not a function object (please report this bug)
trtg commented 4 years ago

@hikhvar running into the same type of "callEdge dynamic function call" error here, but also not clear what the proper syntax for invoking go-callvis on a project using modules is. Can anyone provide a clear example of how to call go-callvis on a given package of a project that uses modules?

wildneuro commented 4 years ago

Having the same problem. Used to work before.

ondrajz commented 4 years ago

Duplicate of #24