tonybaloney / vscode-pets

Adds playful pets šŸ¦€šŸ±šŸ¶ in your VS Code window
https://tonybaloney.github.io/vscode-pets
MIT License
2.23k stars 367 forks source link

Sometimes chooseNextState() throws lots of InvalidStateException() #540

Open phil-chp opened 8 months ago

phil-chp commented 8 months ago

Hello!

Describe the bug From time to time my VSCode starts feeling a little bit slow, I've never really paid attention to it. But there's one frustrating thing, due to the nature of javascript, when the bug occurs, and I try to delete a file from the project file tree view, it hangs (sometimes indefinitely).

After opening DevTools during this bug, I saw more than 3000 errors comming from vscode-pets. There is a condition that is being thrown repeatedly in the chooseNextState() function, more specifically: https://github.com/tonybaloney/vscode-pets/blob/fea56854a5a5c7b690372f7edd2c2e4ddbb4e313/src/panel/basepettype.ts#L244-L246

Screenshots https://github.com/tonybaloney/vscode-pets/assets/72014356/63eb80b3-02e8-4da1-ac83-5aca4d9e1180

Additional context

Version: 1.86.2 (Universal)
Commit: 903b1e9d8990623e3d7da1df3d33db3e42d80eda
Date: 2024-02-13T19:42:13.651Z (3 days ago)
Electron: 27.2.3
ElectronBuildId: 26908389
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Darwin arm64 23.2.0
MacOS: 14.2.1 (23C71)
tonybaloney commented 7 months ago

Huh, thanks for the report. We should fix that. Is it just the cat you have?

phil-chp commented 7 months ago

Yup just the cat, I can't say for sure that the bug is still present, I've stopped using vscode-pets since due to this issue.

I'll turn it back on and see if it's still present (latest vscode build + latest vscode-pets build). I'll update you if I get anything.