webostv icon indicating copy to clipboard operation
webostv copied to clipboard

App hangs in changeFocus

Open cfal opened this issue 4 years ago • 5 comments

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 avatar Mar 04 '20 08:03 cfal

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

cfal avatar Mar 04 '20 08:03 cfal

Hmm, sounds like an issue in tview or tcell?

snabb avatar Mar 04 '20 17:03 snabb

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

snabb avatar Mar 04 '20 19:03 snabb

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.

cfal avatar Mar 05 '20 09:03 cfal

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

aurelf avatar Sep 08 '20 20:09 aurelf