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

'panic: runtime error: index out of range' using --stdin #42

Open
remram44 opened this issue Jun 11, 2018 · 1 comment
Open

'panic: runtime error: index out of range' using --stdin #42

remram44 opened this issue Jun 11, 2018 · 1 comment

Comments

@remram44
Copy link
Contributor

dockviz v0.6.3

curl --unix-socket /var/run/docker.sock -k 'http://localhost/images/json?all=1' | docker run -i --rm nate/dockviz --stdin images -t
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  126k    0  126k    0     0   803k      0 --:--:-- --:--:-- --:--:--  798k
panic: runtime error: index out of range

goroutine 1 [running]:
main.PrintTreeNode(0xc4201f8620, 0xc4201ade50, 0x47, 0xc4201adea0, 0x47, 0x0, 0x0, 0x0, 0xcb45f50b, 0xcb45f50b, ...)
        /go/src/github.com/justone/dockviz/images.go:404 +0x592
main.jsonToText(0xc4201f8620, 0xc4201f45b0, 0x1, 0x1, 0xc420071e90, 0xc400000000, 0xc420012f20, 0x12)
        /go/src/github.com/justone/dockviz/images.go:370 +0x51d
main.jsonToText(0xc4201f8620, 0xc4201f4620, 0x1, 0x1, 0xc420071e90, 0xc400000000, 0xc4201d47f0, 0x10)
        /go/src/github.com/justone/dockviz/images.go:372 +0x650
main.jsonToText(0xc4201f8620, 0xc4201d88c0, 0x2, 0x2, 0xc420071e90, 0xc400000000, 0xc4201d47d0, 0xc)
        /go/src/github.com/justone/dockviz/images.go:365 +0x2f6
main.jsonToText(0xc4201f8620, 0xc4201f4770, 0x1, 0x1, 0xc420071e90, 0xc400000000, 0xc4201d47a0, 0xa)
        /go/src/github.com/justone/dockviz/images.go:372 +0x650
main.jsonToText(0xc4201f8620, 0xc4201d89a0, 0x2, 0x2, 0xc420071e90, 0xc400000000, 0xc4201d4770, 0x6)
        /go/src/github.com/justone/dockviz/images.go:365 +0x2f6
main.jsonToText(0xc4201f8620, 0xc4201d8a80, 0x2, 0x2, 0xc420071e90, 0x0, 0x830155, 0x4)
        /go/src/github.com/justone/dockviz/images.go:365 +0x2f6
main.jsonToText(0xc4201f8620, 0xc4201ea000, 0x36, 0x49, 0xc420071e90, 0xc400000000, 0x0, 0x0)
        /go/src/github.com/justone/dockviz/images.go:365 +0x2f6
main.jsonToTree(0xc4201ea000, 0x36, 0x49, 0xc420071e90, 0x0, 0xc4201e2000, 0x92)
        /go/src/github.com/justone/dockviz/images.go:283 +0xa2
main.(*ImagesCommand).Execute(0xa6ee70, 0xc420071bc0, 0x0, 0x3, 0xa6ee70, 0x1)
        /go/src/github.com/justone/dockviz/images.go:168 +0x491
github.com/justone/dockviz/vendor/github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc420145f10, 0xc42000e110, 0x3, 0x3, 0x0, 0xc420135f70, 0x4046a4, 0xc42006e058, 0x0)
        /go/src/github.com/justone/dockviz/vendor/github.com/jessevdk/go-flags/parser.go:320 +0x841
github.com/justone/dockviz/vendor/github.com/jessevdk/go-flags.(*Parser).Parse(0xc420145f10, 0x744d9c, 0x0, 0x0, 0x16, 0xc420145f10)
        /go/src/github.com/justone/dockviz/vendor/github.com/jessevdk/go-flags/parser.go:190 +0x71
main.main()
        /go/src/github.com/justone/dockviz/cli.go:30 +0x45
@remram44
Copy link
Contributor Author

The JSON array does have this in it, which is as surprising to me as it probably is to you 😕

  {
    "Containers": -1,
    "Created": 1524279355,
    "Id": "sha256:6bf7a4fa2d455fae4ce7f38b0b6db33fc5c5ea537c252b0bab8a6338176cb81b",
    "Labels": null,
    "ParentId": "",
    "RepoDigests": [
      "python@sha256:c6542afed7bac783c9b61f27a963652a6d68c0c6d8e71494706f69ce5b66e082"                                                                          
    ],
    "RepoTags": null,
    "SharedSize": -1,
    "Size": 690537516,
    "VirtualSize": 690537516
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant