rokucommunity / vscode-brightscript-language

A Visual Studio Code extension for Roku's BrightScript language
MIT License
110 stars 41 forks source link

VSC shutdown causes endless "home" keypresses #481

Closed luis-soares-sky closed 1 year ago

luis-soares-sky commented 1 year ago

Using macOS Ventura 13.3.1, VSC 1.78.0.

I got a weird one ever since upgrading the extension from 2.40.0 to 2.40.1: when I exit VSC after at least one debug session, the device I used (usually a Roku Ultra 4670X, connected via WiFi) will start getting spammed with constant "home" keypresses.

I could not identify the root cause as every code process is killed properly, and the only workaround I found so far is to reboot the laptop. If I unplug the Roku and plug it back in without rebooting the laptop, it'll eventually start getting spammed again.

I've since rolled back the extension version to 2.40.0, and the problem is gone.

TwitchBronBron commented 1 year ago

That's probably the weirdest bug I've ever seen. I have no idea why it would be doing this! We only send a home press ONCE at the start of the debug session.

luis-soares-sky commented 1 year ago

It is one of the weirdest things I've seen as well. Not sure if you were able to repro it, but here's a quick video showing what happens.

https://github.com/rokucommunity/vscode-brightscript-language/assets/57358121/2842c2e4-fc50-4c2f-b2f9-602bcf180220

TwitchBronBron commented 1 year ago

Is this still happening? I haven't been able to reproduce it yet.

luis-soares-sky commented 1 year ago

Yep, still happens with 2.40.1.

TwitchBronBron commented 1 year ago

I believe this is caused by the issues that https://github.com/rokucommunity/roku-debug/pull/152 is fixing, where the .shutdown() function enters an infinite loop, where one of the steps is to send a home press.

luis-soares-sky commented 1 year ago

Fixed in 2.40.4. Thank you!