stardog-union / stardog-vsc

Stardog Visual Studio Code Extensions
14 stars 8 forks source link

Possible SHACL Language Server Crash #87

Closed BalduinLandolt closed 1 year ago

BalduinLandolt commented 3 years ago

I'm not entirely sure if this is a VS Code extension issue or an issue of the SHACL language server itself. I also didn't see any error messages or logs anywhere in VS Code, so I can't provide much detailed information.

OS: macOS Big Sur

Description:

When writing SHACL by hand, in the process, the file is invalid quite often, simply because one hasn't finished typing out the rest of the line.
In this process I noticed that every now and again, the error highlighting in VS Code wouldn't go away. In those instances, I had to restart the editor, then it would work again.
After some hours, however, my computer started heating up and CPU usage was at 100%; there were numerous VS COde background processes running, all hoging a lot of CPU. Reloading VS Code (CMD-Shift-P > reload window) didn't kill those processes, I had to hard restart the computer to stop them.

My guess would be that under some circumstances, when the processed .shacl file is invalid, the language server ends up stuck in a loop of some sort of a loop.
Reloading the IDE doesn't seem to kill of the process spawned by the language server; and the same thing may happen to the newly loaded instance of the server.

jmrog commented 3 years ago

Thanks for this report. Are you using the latest version of VS Code and the latest versions of our extensions? Are you able to share any SHACL that seems to cause the issue reliably? Do the background processes get killed if you fully quit VS Code (not just reload window)?

BalduinLandolt commented 3 years ago

I'm actually having a hard time reproducing the bug right now, it seems to be a really sporadic thing. So I can't be really helpful, sorry!

  1. Yes, VS Code and extensions were up to date
  2. I can't reproduce it reliably. The file I worked one can be found here but I don't think that's of any help. I distinctly recall one instance where I copy-pasted something in a sting literal, so there was a mismatch in the quotation marks, which then caused the error. But there were many more instances. Mostly, again, invalid syntax because I was typing something out. The issue was easy to spot, because then the red underline didn't go away when I had fixed the syntax.
  3. I don't think quiting VS Code entirely killed the processes, but I'm not 100% sure anymore.

Again, sorry for not being more helpful here.