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 runtime error #58

Closed
kalbasit opened this issue Aug 3, 2017 · 8 comments
Closed

panic runtime error #58

kalbasit opened this issue Aug 3, 2017 · 8 comments
Assignees
Labels

Comments

@kalbasit
Copy link

kalbasit commented Aug 3, 2017

Getting random panics while typing, mostly when using backspace:

panic: runtime error: slice bounds out of range 
goroutine 19 [running]:
github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go.PollEvent(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/kalbasit/code/profiles/opensource/src/github.com/erroneousboat/slack-term/vendor/github.com/nsf/termbox-go/api.go:330 +0x44f
github.com/erroneousboat/slack-term/handlers.eventHandler.func1(0xc420433600)
	/home/kalbasit/code/profiles/opensource/src/github.com/erroneousboat/slack-term/handlers/event.go:50 +0x30
created by github.com/erroneousboat/slack-term/handlers.eventHandler
	/home/kalbasit/code/profiles/opensource/src/github.com/erroneousboat/slack-term/handlers/event.go:52 +0x3f
@jpbruinsslot
Copy link
Owner

Just to be sure, you are using version 0.2.2?

slack-term -h

@jpbruinsslot jpbruinsslot self-assigned this Aug 4, 2017
@kalbasit
Copy link
Author

kalbasit commented Aug 4, 2017

@erroneousboat that's correct.

jpbruinsslot added a commit that referenced this issue Aug 5, 2017
termbox.PollEvent sometimes trigger a panic whil typing in the
input box (#58). I took note from https://github.com/nsf/godit
and implemented and extra event handler that should potentially
handle more events from termbox.
@jpbruinsslot
Copy link
Owner

jpbruinsslot commented Aug 5, 2017

Ok, I'm trying to exclude things here, because I'm not able to trigger it myself. Are you also able to trigger it when using the binary? I'm asking this, because from the stacktrace it seems you've installed it by go get. It could be happening because of a local version of termbox, but I'm not sure.

Update: Nevermind, I now see that it uses the vendor folder.

I've also made some changes to the code that might help, you can try it out by checking out the branch v02.3-termbox_events and see if you're able to trigger it there.

@kalbasit
Copy link
Author

kalbasit commented Aug 6, 2017

@erroneousboat my apologies for not being clear, had a busy week. I did build it myself, but I did so on the branch for #57 which in turn uses nlopes/slack at https://github.com/nlopes/slack/pull/176. Can you try the branch from my PR and update slack's branch as well. I'll give your branch a shot.

@jpbruinsslot
Copy link
Owner

No problem at all, we all do this in our free time :) I'll try what you suggested and see if I'm able to trigger it. Thanks!

jpbruinsslot added a commit that referenced this issue Aug 19, 2017
termbox.PollEvent sometimes trigger a panic whil typing in the
input box (#58). I took note from https://github.com/nsf/godit
and implemented and extra event handler that should potentially
handle more events from termbox.
jpbruinsslot added a commit that referenced this issue Aug 19, 2017
termbox.PollEvent sometimes trigger a panic whil typing in the
input box (#58). I took note from https://github.com/nsf/godit
and implemented and extra event handler that should potentially
handle more events from termbox.
jpbruinsslot added a commit that referenced this issue Aug 26, 2017
termbox.PollEvent sometimes trigger a panic whil typing in the
input box (#58). I took note from https://github.com/nsf/godit
and implemented and extra event handler that should potentially
handle more events from termbox.
@jpbruinsslot jpbruinsslot changed the title panic while typing in the input box panic runtime error Sep 23, 2017
jpbruinsslot added a commit that referenced this issue Dec 23, 2017
termbox.PollEvent sometimes trigger a panic whil typing in the
input box (#58). I took note from https://github.com/nsf/godit
and implemented and extra event handler that should potentially
handle more events from termbox.
@cshirley
Copy link

This fixed in my pull request

@jpbruinsslot
Copy link
Owner

@cshirley unfortunately, this is not the same issue as in your pull request

@jpbruinsslot
Copy link
Owner

Closing this issue for now, it doesn't seem to be happening anymore. Will re-open it when it does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants