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

bit crash on macOS #91

Closed
Hultner opened this issue Nov 8, 2020 · 1 comment
Closed

bit crash on macOS #91

Hultner opened this issue Nov 8, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@Hultner
Copy link
Contributor

Hultner commented Nov 8, 2020

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Start bit
  2. Jump around between completeions with arrow keys, quickly
  3. Sudden crash
  4. See error in stack trace

Expected behavior
No crash.

Screenshots
If applicable, add screenshots to help explain your problem.
N/A, See stack trace.

Desktop (please complete the following information):

  • OS: 64bit Mac OS X 10.15.5 19F101, Kernel: x86_64 Darwin 19.5.0
  • Terminal: iTerm 2
  • Shell: zsh in tmux

Additional context (Add any other context about the problem here)
Stack trace

> > bit commit --amend --no-edit?[A?[Aruntime error: index out of range [0] with length 0
goroutine 1 [running]:
runtime/debug.Stack(0x16a7180, 0xc000010018, 0xc0000bd160)
        runtime/debug/stack.go:24 +0x9f
github.com/chriswalz/bit/cmd.HandleExit()
        github.com/chriswalz/bit/cmd/util.go:299 +0xd9
panic(0x15a3000, 0xc0003e2180)
        runtime/panic.go:969 +0x1b9
github.com/c-bata/go-prompt.(*CompletionManager).GetSelectedSuggestion(0xc000230000, 0xc00008a000, 0xc000230000, 0x22, 0x0, 0x26)
        github.com/c-bata/[email protected]/completion.go:51 +0x108
github.com/c-bata/go-prompt.(*Render).Render(0xc000220d00, 0xc00008a000, 0xc000230000)
        github.com/c-bata/[email protected]/render.go:207 +0x3bb
github.com/c-bata/go-prompt.(*Prompt).Input(0xc000232000, 0x0, 0x0)
        github.com/c-bata/[email protected]/prompt.go:261 +0x4e5
github.com/c-bata/go-prompt.Input(0x15e3314, 0x6, 0xc000214090, 0xc0000bd7b0, 0xf, 0xf, 0xc12fbb6b8425fc18, 0x1579020)
        github.com/c-bata/[email protected]/shortcut.go:16 +0xd6
github.com/chriswalz/bit/cmd.SuggestionPrompt(0x15e3314, 0x6, 0xc000214090, 0xc0000bd898, 0xc0000bd8c0)
        github.com/chriswalz/bit/cmd/util.go:250 +0x5aa
github.com/chriswalz/bit/cmd.glob..func5(0x199f3c0, 0x19d6558, 0x0, 0x0)
        github.com/chriswalz/bit/cmd/rootShell.go:22 +0x88
github.com/spf13/cobra.(*Command).execute(0x199f3c0, 0xc0000201d0, 0x0, 0x0, 0x199f3c0, 0xc0000201d0)
        github.com/spf13/[email protected]/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0x199f3c0, 0x600, 0x0, 0x0)
        github.com/spf13/[email protected]/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/[email protected]/command.go:895
github.com/chriswalz/bit/cmd.Execute()
        github.com/chriswalz/bit/cmd/rootShell.go:100 +0x31
main.bitcli(...)
        github.com/chriswalz/bit/main.go:78
main.main()
        github.com/chriswalz/bit/main.go:66 +0x94b

OS: darwin amd64
bit version v0.8.0
git version 2.26.2
@Hultner Hultner added the bug Something isn't working label Nov 8, 2020
@chriswalz
Copy link
Owner

PR on go-prompt c-bata/go-prompt#211

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants