micro-editor / micro-editor/micro
Crash after running shell command (Ctrl+B)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 29.6k
- Forks
- 1.4k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 10
Description
Description of the problem or steps to reproduce
I was reading the micro documentation (keybindings) and I decided to run a shell command (Ctrl+B). The command was pwd. After pressing enter to return to micro, it crashed:
pi@emile:/usr/local/bin $ micro
/usr/local/bin
Press enter to continue
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x4c pc=0x20b2fc]
goroutine 12 [running]:
github.com/zyedidia/micro/cmd/micro/vendor/github.com/zyedidia/tcell.(*tScreen).PollEvent(0x0, 0x126697e4, 0x0)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/vendor/github.com/zyedidia/tcell/tscreen.go:801 +0x14
main.main.func5()
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/micro.go:454 +0x34
created by main.main
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/micro.go:451 +0x1458
I tried to reproduce this bug but I have failed.
Specifications
Version: 1.4.0
Commit hash: af520cf
Compiled on January 26, 2018
OS: Raspbian Stretch (running on a Raspberry Pi 3B)
Terminal: LXTerminal 0.3.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the panic location in cmd/micro/vendor/github.com/zyedidia/tcell/tscreen.go:801 and the event-handling goroutine in cmd/micro/micro.go around lines 451-454. Reproduce the Ctrl+B shell command flow with pwd on the reported environment if possible, then trace why returning to micro can leave PollEvent without a valid screen. Done means returning from the shell command no longer crashes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100