Error running ensime-source-buffer-loaded-hook - OSX with ENSIME and Emacs - scala

I get the following error when trying to start ENSIME on OSX through Emacs
Error running ensime-source-buffer-loaded-hook
I am following the instructions from the github source page
Scala Mode is Working
ENSIME Server appears to be installed, is there any way to verify this?
The sbt plugin is installed and I have a .ensime config file generated
Starting Emacs gives me the above error. When I manually try M-x ensime I get the following:
Failed to connect to Swank: server process exited.

Okay, here's how I solved it:
Locate the ensime folder and run bin/server /tmp/ensime.port.
I got the error:
java -classpath ... org.ensime.server.Server ./port
Unrecognized VM option '+DoEscapeAnalysis'
Could not create the Java virtual machine.
I have no idea what DoEscapeAnalysis is for, but I tried deleting it from bin/server and now everything seems to work.
See here: https://gist.github.com/2300737

For my case on Windows 7, with the same error message, but the root cause was the original setting for the maximum heap size -Xmx1512M was too large, I had to change to -Xmx768M to get over the error message.
I had also removed the byte compiled elisp code, and restart to avoid another error of
"call time out".

I also had this error on linux with emacs 24.3.1 and resolved it by specifying the full path to java in bin/server.

Related

ghidra errors when trying to open ELF file

I am very new to Ghidra, I have just installed it in order to try and decompile an ELF file.
when trying to assign the file to the new Ghidra project, I get these error messages:
Loading language 'x86:LE:64:default' - Uncaught Exception: ghidra.app.plugin.processors.sleigh.SleighException: File not found - language probably did not compile properly
Can't read language spec C:\Program Files\ghidra_9.1.2_PUBLIC\Ghidra\Processors\x86\data\languages\x86-64.sla
java.io.FileNotFoundException: C:\Program Files\ghidra_9.1.2_PUBLIC\Ghidra\Processors\x86\data\languages\x86-64.sla (Access is denied)
What can I do to fix these?
I got the same error today. After trying a few things unsuccessfully (using a different version of JDK (and changing the environment variables to include the other JDK version), installing all the Ghidra extensions, and re-copying the x86-64.sla file, none of those worked. But, I decided to try running Ghidra as Administrator in the hopes it would not run into permission errors and voila!, it worked.

Eclipse CDT 4.11.0 crashes with SWT library not found error

I am trying to get Eclipse 4.11.0 running on my RHEL 6.10 system but it crashes when I try to run it. It points me to a log file that states:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I tried running it again and it crashed again with a different log file entry:
...UnsatisfiedLinkError Could not load SWT library
It was looking for:
~/.swt/lib/linux/x86_64/libswt-pi4-gtk-4924r25.so
but the only file in that directory was libswt-pi3-gtk-4924r25.so
I also found libswt-pi3-gtk-4924r25.so in eclipse/configuration/org.eclipse.osgi/458/0/.cp.
I removed my ~/.swt directory and ran it again. Once again I got:
...UnsatisfiedLinkError org.eclipse.swt.internal.gtk.OS._cachejvmptr()V
I noticed that it made the ~/.swt/… directory structure and put the libswt-pi3-gtk-4924r25.so file in it so I tried to run it again and it (not surprisingly) gave me the following:
...UnsatisfiedLinkError Could not load SWT library
Does this have something to do with the version of gtk that I'm running on my system? Why does eclipse include the libswt-pi3-gtk.4924r25.so library in their installation, then look for the libswt-pi4-gtk-4924r25.so library?
Installing libgthread resolved the issue for me (SLES15, GTK3).

QuickChick "Error: Could not compile mli file"

I successfully installed coq 8.9.1 and coq-quickchick 1.1.0 with opam 2.0.4 and I'm programming on emacs 26.1.
However, when running a QuickChick command I received the following error:
Error: Could not compile mli file
Any ideas of what I can do?
Also, I have tried to include the following command before the QuickChick command:
"QuickChickDebug Debug On."
Still, no success and no instructive message was provided.
You can try to manually extract and compile.
A first idea is to replace QuickChick my_prop. with Extraction TestCompile my_prop., which will also try to compile.
There is also Separate Extraction my_prop. (assuming my_prop is an identifier), which just outputs .ml files so you can compile them by hand and see what is wrong.
There are other variants of extraction worth knowing about:
https://coq.inria.fr/distrib/current/refman/addendum/extraction.html#generating-ml-code
Can you compile the file from command line? If you can, you can open emacs from the command line and re-run and see.
BTW, what's your OS? I have the same problem on OS X Catalina and the problem comes from the privacy policy of Catalina I guess.

Eclipse nodejs vjet v8 debugging

I am using Eclipse helios and I installed vjet and v8 debugging from the steps in the link below:-
http://jonathan-whywecanthavenicethings.blogspot.in/2011/08/war-of-worlds.html
Also, NodejsTL zip file i downloaded and set it in the build path of my project
But when i am trying to debug it in eclipse via. external tools configuration , I am getting below error:-
debugger listening on port 5858
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module 'E:\eclipse-jee-helios-SR1-win32\workspace\nodejswkspace\TempVjetProject\Server1.js'
at Function._resolveFilename (module.js:332:11)
at Function._load (module.js:279:25)
at Array.0 (module.js:479:10)
at EventEmitter._tickCallback (node.js:192:40)
There's a pretty high chance that eclipse stuck it in a "src" or "source" folder when you set it up. As such the run configuration is basically assuming that your source folder deploys at root.
Double check the pathing and then try again. What I did was eliminate the source folder so I didn't have to deal with--alternatively do something like
--debug src/${resource_name}
//or better still since the above shouldn't work for subfolders...
--debug ${workspace_loc}/${resource_path}
I bet your path looks like:
E:\eclipse-jee-helios-SR1-win32\workspace\nodejswkspace\TempVjetProject\***src***\Server1.js
Here's what my project looks like now:
For my configuration this renders:

java.io.IOException when running sbt from ensime?

I have tried ensime/sbt on mac os. First, I open the .scala file in project folder create from using sbt in command-line, then I ran ensime and it still work fine, but whenever I run ensime-sbt (c-c c-v s), I got
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:883)
at xsbt.boot.Locks$.apply0(Locks.scala:34)
at xsbt.boot.Locks$.apply(Locks.scala:27)
at scala.collection.Iterable$class.$init$(Proxy.scala:32)
at xsbt.boot.Launch$ScalaProvider.<init>(Launch.scala:107)
at xsbt.boot.Launch$$anonfun$1.apply(Launch.scala:83)
at org.apache.ivy.plugins.namespace.NamespaceRule.newEntry(Cache.scala:17)
at org.apache.ivy.plugins.namespace.NamespaceRule.apply(Cache.scala:12)
at xsbt.boot.Launch.getScala(Launch.scala:85)
at xsbt.boot.Launch$.run(Launch.scala:49)
at xsbt.boot.Launch$$anonfun$explicit$1.apply(Launch.scala:43)
at xsbt.boot.Launch$.launch(Launch.scala:68)
at xsbt.boot.Launch$.apply(Launch.scala:14)
at xsbt.boot.Boot$.runImpl(Boot.scala:24)
at xsbt.boot.Boot$.main(Boot.scala:15)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.io.IOException: No such file or directory
Process sbt exited abnormally with code 1
I tried using sbt from command-line and everything works from there (compile/run/console). I'm using sbt 0.10.1 and latest binary ensime on emacs24 (2011/07/24) on mac os.
Any idea that I'm doing it wrong ?
I had this and after applying strace I found the issue. The ensime-sbt.el function searches up from the cwd looking for ./project/build.properties. On finding this dir/file it assumes this is the root directory.
So just create this file and this issue should disappear. Would be nice if ensime created this file by default seeing as it's a required file for the sbt function to work.
I got the same error. This situation seems to be that sbt tried but failed to create ".sbt" and ".ivy" dir at the user's home directory. Maybe, the reason is that OS user doesn't have permission to write at the user's home directory.
It's something related with permission, maybe.
I checked the Locks.scala https://github.com/harrah/xsbt/blob/0.10/launch/Locks.scala source, and guessed "file.getParentFile.mkdirs()" did no work because of permission denial.
I encountered the same problem yesterday, and got it run a minute ago, by adding sudo:
"sudo emacs xxx.scala"
you can change sbt.ivy.home and ivy.home property. So, to augment Joachim's first solution, you would set both system properties:
like this:
java -Dsbt.ivy.home=/tmp/.ivy2/ -Divy.home=/tmp/.ivy2/ -jar dirname $0/sbt-launch.jar "$#"
hope to resolve you problem
This error also occurs when the files in the home directory that sbt tries to access are not owned by the user that tries to run it. run a chmod 777 on the directoris in the home master and the issue will be solved.