dcaoyuan / nbscala

NetBeans Plugin for Scala
247 stars 57 forks source link

'Open SBT Console' fails to open properly and dies silently after that #155

Open frgomes opened 8 years ago

frgomes commented 8 years ago

For some unknown reason, Open SBT Console fails to open, even though apparently, the command to be executed by ExecutorService is valid. The command to be executed is displayed in the IDE Log and I was able to run the very same command properly inside a Netbeans terminal window. The command also runs properly from the Unix shell.

I've spent some time investigating the problem and added some log.info statements in SBTTopComponent , but I was only able to see that apparently the command was OK, arguments where OK and everything apparently was fine.

I've changed SBTTopComponent in order to avoid the window to close quickly and allow me to see the error. It says that it was unable to load the mainClass of sbt-launcher.jar. But this must be a false negative because the mainClass is there and the manifest file is OK. I've also replaced the .jar file by another one from SBT distribution and the behaviour persists.

I've done several reinstallations of Netbeans from scratch, from a clean slate (no Java, no Scala, no SBT) to a virtualenv populated with recent version of Java, Scala and SBT. I've removed all Netbeans directories, caches and project folders. I've double checked netbeans.conf and parameters in the SBT tab (contributed by nbscala to Netbeans), copying configurations from another computer which behaves properly. Nothing seems to make any difference. The same behaviour persists.

I have downgraded SBT to the same version nbscala employs. I've removed SBT from the PATH variable, removed SBT_HOME, SBT_OPTS, removed the entire $HOME/.sbt... Nothing seems to make any difference.

I haven't found any explanation for the failure. There's absolutely nothing which could easily determine that it works in one computer but not in another computer.

barulheira commented 7 years ago

This can be related. NetBeans 8.1 or 8.2 freezes on opening SBT console, on FreeBSD and OpenJDK8. Similar installations work well: NetBeans 8.1 or 8.2 on Linux and Oracle Java.

akochnev commented 7 years ago

This could also be related to Issue #176 . @frgomes - did you install this from a dev build or from the published plugins ?

barulheira commented 7 years ago

Both. The published plugins in NB 8.1, and a fresh build in NB 8.2