intellij-lsp
intellij-lsp copied to clipboard
NPE in FileUtils.scala:99 when editor '.gitignore' is open initially
Here's the stack trace:
java.lang.NullPointerException
at com.github.gtache.lsp.utils.FileUtils$.editorToProjectFolderPath(FileUtils.scala:99)
at com.github.gtache.lsp.PluginMain$.$anonfun$editorOpened$3(PluginMain.scala:117)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
It appears that this exception only occurs if an editor containing .gitignore
is open initially.
- Reproducing no error:
- close all editors
- quit & restart Webstorm
- all is good
- Reproducing error
- close all editors, open '.gitignore'
- quit & restart Webstorm
- Webstorm exception alert is popping up after about 5s
Hey, I got #42, that's nice ;-)
That's strange, I can't reproduce it on IntelliJ. Tried with only .gitignore opened and with both .gitignore and a C file while having cquery configured, but I don't get the error. That may be Webstorm-specific or specific to a language server.
I'll try later with Webstorm, what language server are you using?
None right now. I used the plugin for another project a while ago, not using LSP currently.
Let me know if you cannot reproduce with webstorm. I had this behaviour on two different computers, so I can probably consistently reproduce.