snabb / webostv

LG WebOS smart TV remote control terminal program and Go library package (golang)
MIT License
40 stars 8 forks source link

App hangs in changeFocus #1

Open cfal opened 4 years ago

cfal commented 4 years ago

I tested this with go 1.14 on MacOS with all dependencies fetched today. After starting the app, the remote app becomes unresponsive after the first key press.

I tracked the problem down to this app.Draw() invocation in changeFocus function: https://github.com/snabb/webostv/blob/master/cmd/webostvremote/main.go#L74

After commenting this out, everything worked fine.

cfal commented 4 years ago

It looks like I also had to remove app.Draw() calls in wselinfo/wtvinfo/wvolume as well or it would hang again.

snabb commented 4 years ago

Hmm, sounds like an issue in tview or tcell?

snabb commented 4 years ago

Might be related: https://github.com/gdamore/tcell/issues/191

cfal commented 4 years ago

Thanks for the info. Moving the Draw calls to their own goroutine when possible fixes the problem. Not sure if it's related to https://github.com/gdamore/tcell/issues/191 or if it's another deadlock problem somewhere inside tview or tcell. Created https://github.com/snabb/webostv/pull/2 which fixes it for me.

aurelf commented 4 years ago

2 made webostvremote work for me too, with go 1.15.1 on Arch Linux.