Skip to content

cmd/godoc: assignment to entry in nil map error #7556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue Mar 16, 2014 · 4 comments
Closed

cmd/godoc: assignment to entry in nil map error #7556

gopherbot opened this issue Mar 16, 2014 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by rayneolivetti:

I just checked & ran out godoc from the tools repo. Main page opens fine, but when I
try /pkg, I get a panic from stdout:

$ godoc -http=:6060
2014/03/16 14:24:27 http: panic serving [::1]:35158: runtime error: assignment to entry
in nil map
goroutine 53874 [running]:
net/http.func·009()
        /usr/lib/go/src/pkg/net/http/server.go:1093 +0xae
runtime.panic(0x95c380, 0x10f699d)
        /usr/lib/go/src/pkg/runtime/panic.c:248 +0x106
code.google.com/p/go.tools/godoc/analysis.(*Result).pkgInfo(0xc210062870, 0xa03200, 0x1,
0x1)
        /root/go/src/code.google.com/p/go.tools/godoc/analysis/analysis.go:244 +0xc4
code.google.com/p/go.tools/godoc/analysis.(*Result).PackageInfo(0xc210062870, 0xa03200,
0x1, 0xa03200, 0x1, ...)
        /root/go/src/code.google.com/p/go.tools/godoc/analysis/analysis.go:256 +0x40
code.google.com/p/go.tools/godoc.(*handlerServer).ServeHTTP(0xc21ff701d0,
0x7f51cebd2150, 0xc21ff7cc80, 0xc210038c30)
        /root/go/src/code.google.com/p/go.tools/godoc/server.go:266 +0x6c7
net/http.(*ServeMux).ServeHTTP(0xc214c96420, 0x7f51cebd2150, 0xc21ff7cc80, 0xc210038c30)
        /usr/lib/go/src/pkg/net/http/server.go:1496 +0x163
code.google.com/p/go.tools/godoc.(*Presentation).ServeHTTP(0xc21ff70180, 0x7f51cebd2150,
0xc21ff7cc80, 0xc210038c30)
        /root/go/src/code.google.com/p/go.tools/godoc/pres.go:133 +0x49
net/http.(*ServeMux).ServeHTTP(0xc21001d660, 0x7f51cebd2150, 0xc21ff7cc80, 0xc210038c30)
        /usr/lib/go/src/pkg/net/http/server.go:1496 +0x163
net/http.serverHandler.ServeHTTP(0xc21fd2b280, 0x7f51cebd2150, 0xc21ff7cc80,
0xc210038c30)
        /usr/lib/go/src/pkg/net/http/server.go:1597 +0x16e
net/http.(*conn).serve(0xc21fe70900)
        /usr/lib/go/src/pkg/net/http/server.go:1167 +0x7b7
created by net/http.(*Server).Serve
        /usr/lib/go/src/pkg/net/http/server.go:1644 +0x28b

By the way, I had to install it as a root. I hope the special treatment of tools will
stop someday: distros do not provide them as packages (probably because they are
considered to be unstable?), go devs don't want to include them in go distribution. Both
sides deny/ignore the problem. End result: we users have to do the ugly thing of
installing stuff /usr without the package manager. Could someone please do something
about this? Or at least acknowledge that there is something wrong with the current
scheme.
@bradfitz
Copy link
Contributor

Comment 1:

What version of go and go.tools do you have? Run "hg id" in both please and report back?
From your root comment, I think you might be mixing versions. godoc _is_ included in our
releases. I suggest you use that, instead of building it yourself.

Owner changed to [email protected].

Status changed to WaitingForReply.

@adonovan
Copy link
Member

Comment 2:

Sorry for the careless regression; fix pending.
I will come up with some basic integration tests for godoc this week since the current
situation is too manual and fragile.

Owner changed to @adonovan.

@adonovan
Copy link
Member

Comment 3:

Fix pending in https://golang.org/cl/76410045

@adonovan
Copy link
Member

Comment 4:

Fixed by https://code.google.com/p/go/source/detail?r=bc3dddd1dd06&repo=tools .
Please file a separate issue if the packaging question remains unaddressed.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants