Skip to content

panic in location mode when no path matched #891

@zhsj

Description

@zhsj
Contributor
~/go/src/github.com/elves/elvish>                                                                                                                                            zhsj@zhsj-debian
 LOCATION  xxx
(0x97dae0,0xc000262060)
goroutine 1 [running]:
github.com/elves/elvish/pkg/sys.DumpStack(0x97dae0, 0xc000262060)
        github.com/elves/elvish/pkg/sys/dumpstack.go:10 +0x9d
github.com/elves/elvish/pkg/program/shell.rescue()
        github.com/elves/elvish/pkg/program/shell/shell.go:66 +0xa4
panic(0x97dae0, 0xc000262060)
        /usr/lib/go-1.13/src/runtime/panic.go:679 +0x1b2
github.com/elves/elvish/pkg/cli/addons/location.Start.func3(0xa7fb00, 0xc000125e60, 0x0)
        github.com/elves/elvish/pkg/cli/addons/location/location.go:97 +0x232
github.com/elves/elvish/pkg/cli.(*listBox).Accept(0xc000210510)
        github.com/elves/elvish/pkg/cli/listbox.go:390 +0x74
github.com/elves/elvish/pkg/cli.(*listBox).Handle(0xc000210510, 0xa79f40, 0xc00024c1b8, 0x441c74)
        github.com/elves/elvish/pkg/cli/listbox.go:264 +0x174
github.com/elves/elvish/pkg/cli.(*comboBox).Handle(0xc00020ee00, 0xa79f40, 0xc00024c1b8, 0x0)
        github.com/elves/elvish/pkg/cli/combobox.go:62 +0x63
github.com/elves/elvish/pkg/cli.(*app).handle(0xc0001cc000, 0x954700, 0xc00024c1b8)
        github.com/elves/elvish/pkg/cli/app.go:164 +0x1e8
github.com/elves/elvish/pkg/cli.(*loop).Run(0xc0001b23c0, 0xc0001c2001, 0xc0001d4180, 0xc0001cc000, 0xc00024c0a0)
        github.com/elves/elvish/pkg/cli/loop.go:129 +0x230
github.com/elves/elvish/pkg/cli.(*app).ReadCode(0xc0001cc000, 0x0, 0x0, 0x0, 0x0)
        github.com/elves/elvish/pkg/cli/app.go:331 +0x4eb
github.com/elves/elvish/pkg/edit.(*Editor).ReadCode(0xc00024e580, 0xc0000a4010, 0xc000029560, 0x12, 0x0)
        github.com/elves/elvish/pkg/edit/editor.go:97 +0x33
github.com/elves/elvish/pkg/program/shell.interact(0xc0000a4000, 0xc0000a4008, 0xc0000a4010, 0xc000178000, 0xc000029560, 0x12, 0xc000178000)
        github.com/elves/elvish/pkg/program/shell/interact.go:48 +0x293
github.com/elves/elvish/pkg/program/shell.(*Shell).Main(0xc00012c840, 0xc0000a4000, 0xc0000a4008, 0xc0000a4010, 0xc000096190, 0x0, 0x0, 0x0)
        github.com/elves/elvish/pkg/program/shell/shell.go:54 +0x320
github.com/elves/elvish/pkg/program.Main(0xc000096190, 0x1, 0x1, 0x0)
        github.com/elves/elvish/pkg/program/program.go:119 +0x1f4
main.main()
        github.com/elves/elvish/main.go:14 +0x45

it.(list).dirs is empty, while i is 0.

Activity

zhsj

zhsj commented on Jan 2, 2020

@zhsj
ContributorAuthor

also in HISTORY mode

zzamboni

zzamboni commented on Jan 2, 2020

@zzamboni
Contributor

I can reproduce this in v0.13-28-g241433c2.

added 2 commits that reference this issue on Jan 2, 2020
63d7d21
0cb4699
added 3 commits that reference this issue on Jan 2, 2020
b161d1e
6b9e89f
6d70e3b
added 2 commits that reference this issue on Jan 2, 2020
35d9786
864d14a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @zzamboni@zhsj@xiaq

      Issue actions

        panic in location mode when no path matched · Issue #891 · elves/elvish