rhdunn / xquery-intellij-plugin

XQuery, XPath and XSLT Language Support for the IntelliJ IDE
https://rhdunn.github.io/xquery-intellij-plugin/
Apache License 2.0
25 stars 9 forks source link

Error when creating a new Run Configuration or editing an existing Run Configuration #131

Closed CanOfBees closed 5 years ago

CanOfBees commented 5 years ago

Hi Reece -

I'm running into an error when I create a new Run Configuration with the XPath, XQuery, or XSLT options available through the plugin (additionally, I experience a similar error when attempting to edit a previously created Run Configuration). I'm thinking that this cropped up in the one of the very latest IDEA builds.

Please let me know if there are any additional details that would help debug this problem.

As always, thanks very much!

intellij-xquery-plugin-error.txt

IDEA details: IntelliJ IDEA 2019.2 (Ultimate Edition) Build #IU-192.5728.98, built on July 23, 2019 Licensed to Bridger Dyson-Smith Subscription is active until November 5, 2019 Runtime version: 1.8.0_212-b04 amd64 VM: OpenJDK 64-Bit Server VM by Oracle Corporation FreeBSD 12.0-RELEASE-p8 GC: ParNew, ConcurrentMarkSweep Memory: 1979M Cores: 16 Registry: debugger.watches.in.variables=false, ide.tooltip.initialDelay=499, git.explicit.commit.renames.prohibit.multiple.calls=false Non-Bundled Plugins: FrameSwitcher, PIT mutation testing Idea plugin, Unicode Browser, com.jetbrains.jbre.bintray.downloader, com.jetbrains.plugins.ini4idea, com.siberika.idea.pascal, com.ultrahob.zerolength.plugin, mobi.hsz.idea.gitignore, org.intellij.RegexpTester, org.jetbrains.plugins.rest, com.jetbrains.php, com.jetbrains.php.drupal, com.jetbrains.twig, org.intellij.scala, org.jetbrains.plugins.phpstorm-remote-interpreter, org.jetbrains.plugins.vagrant, Pythonid, com.vladsch.idea.multimarkdown, org.jetbrains.plugins.ruby, org.logtalk, sparql4idea, uk.co.reecedunn.intellij.plugin.xquery

CanOfBees commented 5 years ago

I had an opportunity to check on the 2019.1 and got the same error:

IntelliJ IDEA 2019.1.4 (Ultimate Edition)
Build #IU-191.8026.42, built on July 30, 2019
Licensed to Bridger Dyson-Smith
Subscription is active until November 5, 2019
JRE: 1.8.0_212-b04 amd64
JVM: OpenJDK 64-Bit Server VM by Oracle Corporation
FreeBSD 12.0-RELEASE-p8
rhdunn commented 5 years ago

I can reproduce this error. Specifically, it is occurring in this instance when the BaseX server is not running, or has been changed to a different port. This is via the underlying "Connection refused" error.

This should be displayed along side the affected query processor instance. I'm looking into why that is not happening.

CanOfBees commented 5 years ago

I most frequently use the 'Active editor file' for testing a query, and in the 'New Query Processor Instance' window, I have 'Create a standalone instance' selected; in other words, I'm not usually running a query against a database, but just as a standalone instance.

Troublingly, I am unable to reproduce this on a Linux system (same plugins, same editor versions, etc). I'm left thinking that I've grossly misconfigured something on the FreeBSD system. I'll try to do a bit more digging.

Thank you for your help!

CanOfBees commented 5 years ago

I can't seem to find a significant difference between the two systems in terms of IntelliJ and the plugin. Aside from the earlier attached error, the most telling difference in behavior is when trying to edit a Run/Debug configuration.

On the working system, it looks like this (i.e. normal): working-run-debug-config

Here's a screenshot of the box where it throws the error: failing-run-debug-config

rhdunn commented 5 years ago

I have pushed a change to the dev version a few days ago to handle the error you reported so that the error is not reported in the IntelliJ exception log. You should see something like:

BaseX 9.2.4 (BaseX) [Cannot connect to localhost]

in the affected processor. This should resolve the blank page, which is a result of that error.

NOTE 1: The error may not be for the processor selected in the "active-editor-file" run configuration. If you click on the query processor dropdown "v" arrow, you should see the processor that is causing the issue.

NOTE 2: The changes I have made should also improve the performance in this case.

Can you test the latest development build of the plugin and let me know if you encounter any issues?

CanOfBees commented 5 years ago

Your changes have solved my problem. Thank you for the update!

Edit: closing the issue.