isacikgoz / tldr

fast and interactive tldr client written with go
https://isacikgoz.me/tldr/
MIT License
1.36k stars 48 forks source link

Bug: Panic on any prompt input #23

Closed curio77 closed 3 years ago

curio77 commented 4 years ago

When inputting anything on any prompt shown in response to selecting a command pattern, tldr crashes. The panic happens in package gitin due to a send on a closed channel, but this needn't mean it isn't caused by the application.

> tldr tar
Archiving utility.
Often combined with a compression method, such as gzip or bzip.
More information: <https://www.gnu.org/software/tar>.

  Extract an archive into a target directory
  tar xf source.tar -C directory

$ source.tar -> panic: send on closed channel

goroutine 7 [running]:
github.com/isacikgoz/gitin/prompt.(*Prompt).spawnEvents(0xc00014c000)
        /home/curio77/.go/pkg/mod/github.com/isacikgoz/gitin@v0.2.3/prompt/prompt.go:185 +0xf2
created by github.com/isacikgoz/gitin/prompt.(*Prompt).Run
        /home/curio77/.go/pkg/mod/github.com/isacikgoz/gitin@v0.2.3/prompt/prompt.go:141 +0xf0
jemag commented 4 years ago

Having the exact same problem here on arch linux, built from source. Also the search function is really laggy while typing

dolmen commented 4 years ago

Same here on second run:

tldr ps
Information about running processes.

  Search for a process that matches a string
  ps aux | grep string

$ string -> panic: send on closed channel

goroutine 7 [running]:
github.com/isacikgoz/gitin/prompt.(*Prompt).spawnEvents(0xc00012a000)
    $GOPATH/pkg/mod/github.com/isacikgoz/gitin@v0.2.3/prompt/prompt.go:185 +0xf2
created by github.com/isacikgoz/gitin/prompt.(*Prompt).Run
    $GOPATH/pkg/mod/github.com/isacikgoz/gitin@v0.2.3/prompt/prompt.go:141 +0xf0
go version go1.13.6 darwin/amd64

Commit: 3918253df491996b5618f2eb3de015170d63c21a

isacikgoz commented 4 years ago

Hey, thanks for the feedback I will be looking into this. The issue is related to another project of mine, I will update this issue once it is resolved.