Skip to content

cachestats: panic if run on non cached remote #1855

Closed

Description

@ncw

If you try cachestats on a non cache remote it explodes!

$ rclone cachestats memstore:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x81a9be]

goroutine 1 [running]:
github.com/ncw/rclone/cmd/cachestats.glob..func1.1(0xc420378180, 0x9)
	/home/ncw/go/src/github.com/ncw/rclone/cmd/cachestats/cachestats.go:45 +0x1be
github.com/ncw/rclone/cmd.Run(0xc420180101, 0x15dc740, 0xc420053d08)
	/home/ncw/go/src/github.com/ncw/rclone/cmd/cmd.go:265 +0xa7
github.com/ncw/rclone/cmd/cachestats.glob..func1(0x15dc740, 0xc420183a80, 0x1, 0x1)
	/home/ncw/go/src/github.com/ncw/rclone/cmd/cachestats/cachestats.go:41 +0x1aa
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).execute(0x15dc740, 0xc420183a30, 0x1, 0x1, 0x15dc740, 0xc420183a30)
	/home/ncw/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:654 +0x2a2
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x15dc2c0, 0xc420259f70, 0x406234, 0xc4200220b8)
	/home/ncw/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:729 +0x2fe
github.com/ncw/rclone/vendor/github.com/spf13/cobra.(*Command).Execute(0x15dc2c0, 0xc4202d8120, 0x20)
	/home/ncw/go/src/github.com/ncw/rclone/vendor/github.com/spf13/cobra/command.go:688 +0x2b
main.main()
	/home/ncw/go/src/github.com/ncw/rclone/rclone.go:15 +0x31

Activity

  1. added this to the v1.39 milestone on Nov 23, 2017
  2. ncw commented on Nov 24, 2017

    @ncw
    MemberAuthor

    I fixed this one since it was easy :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions