Skip to content
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

x/talks: panic extracting code snippet #7163

Closed
josharian opened this issue Jan 21, 2014 · 2 comments
Closed

x/talks: panic extracting code snippet #7163

josharian opened this issue Jan 21, 2014 · 2 comments

Comments

@josharian
Copy link
Contributor

What steps will reproduce the problem?

I haven't had a chance to extract a small test case yet. In the meantime:

1. go get github.com/josharian/kart
2. cd $GOPATH/src/github.com/josharian/kart
3. git checkout code-snippet-panic 
4. present
5. open "http://localhost:3999/kart.slide#1";

What is the expected output? What do you see instead?

2014/01/21 10:15:17 http: panic serving 127.0.0.1:64105: runtime error: slice bounds out
of range
goroutine 534 [running]:
net/http.func·009()
    .../src/pkg/net/http/server.go:1093 +0xae
runtime.panic(0x319d40, 0x76650a)
    .../src/pkg/runtime/panic.c:248 +0x106
code.google.com/p/go.tools/present.codeLines(0xc210174000, 0xbb0, 0xdb0, 0x755, 0x6a2,
...)
    .../code.google.com/p/go.tools/present/code.go:186 +0x5ae
code.google.com/p/go.tools/present.parseCode(0xc2101483a0, 0xc21013f920, 0xa, 0x70,
0xc210141480, ...)
    .../code.google.com/p/go.tools/present/code.go:99 +0x943
code.google.com/p/go.tools/present.parseSections(0xc2101483a0, 0xc21013f920, 0xa,
0xc21016dfa0, 0xb77a68, ...)
    .../code.google.com/p/go.tools/present/parse.go:356 +0x18a8
code.google.com/p/go.tools/present.(*Context).Parse(0xc2101483a0, 0x8ab8f0,
0xc210148398, 0xc21013f920, 0xa, ...)
    .../code.google.com/p/go.tools/present/parse.go:263 +0x207
code.google.com/p/go.tools/present.Parse(0x8ab8f0, 0xc210148398, 0xc21013f920, 0xa, 0x0,
...)
    .../code.google.com/p/go.tools/present/parse.go:273 +0x7b
main.parse(0xc21013f920, 0xa, 0x0, 0x0, 0x0, ...)
    .../code.google.com/p/go.talks/present/dir.go:99 +0xdb
main.renderDoc(0x8acc38, 0xc2101866e0, 0xc21009f910, 0x40, 0xc21013f920, ...)
    .../code.google.com/p/go.talks/present/dir.go:66 +0x50
main.dirHandler(0x8acbd8, 0xc2101866e0, 0xc2100f3a90)
    .../code.google.com/p/go.talks/present/dir.go:33 +0x204
net/http.HandlerFunc.ServeHTTP(0x43ced8, 0x8acbd8, 0xc2101866e0, 0xc2100f3a90)
    .../src/pkg/net/http/server.go:1220 +0x40
net/http.(*ServeMux).ServeHTTP(0xc21001e600, 0x8acbd8, 0xc2101866e0, 0xc2100f3a90)
    .../src/pkg/net/http/server.go:1496 +0x163
net/http.serverHandler.ServeHTTP(0xc21009fbe0, 0x8acbd8, 0xc2101866e0, 0xc2100f3a90)
    .../src/pkg/net/http/server.go:1597 +0x16e
net/http.(*conn).serve(0xc210136f00)
    .../src/pkg/net/http/server.go:1167 +0x7b7
created by net/http.(*Server).Serve
    .../src/pkg/net/http/server.go:1644 +0x28b
@rsc
Copy link
Contributor

rsc commented Mar 3, 2014

Comment 1:

Labels changed: added repo-talks.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc changed the title go.talks: panic extracting code snippet x/talks: panic extracting code snippet Apr 14, 2015
@rsc rsc modified the milestones: Unreleased, Unplanned Apr 14, 2015
@rsc rsc removed the repo-talks label Apr 14, 2015
@gopherbot
Copy link

CL https://golang.org/cl/21182 mentions this issue.

@golang golang locked and limited conversation to collaborators Sep 13, 2017
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

4 participants