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 in location mode when no path matched #891

Closed
zhsj opened this issue Jan 2, 2020 · 2 comments · Fixed by #892
Closed

panic in location mode when no path matched #891

zhsj opened this issue Jan 2, 2020 · 2 comments · Fixed by #892
Labels

Comments

@zhsj
Copy link
Contributor

zhsj commented Jan 2, 2020

~/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.

@zhsj
Copy link
Contributor Author

zhsj commented Jan 2, 2020

also in HISTORY mode

@zzamboni
Copy link
Contributor

zzamboni commented Jan 2, 2020

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

zhsj added a commit to zhsj/elvish that referenced this issue Jan 2, 2020
zhsj added a commit to zhsj/elvish that referenced this issue Jan 2, 2020
zhsj added a commit to zhsj/elvish that referenced this issue Jan 2, 2020
zhsj added a commit to zhsj/elvish that referenced this issue Jan 2, 2020
zhsj added a commit to zhsj/elvish that referenced this issue Jan 2, 2020
@xiaq xiaq closed this as completed in #892 Jan 2, 2020
xiaq pushed a commit that referenced this issue Jan 2, 2020
xiaq pushed a commit that referenced this issue Jan 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants