vmarg -XX:+HeapDumpOnOutOfMemoryError has no effect - eclipse-rcp

I have an exported Eclipse RichClient Application (Product.exe) that throws sometimes OutOfMemory Errors (unable to create native thread) and it tried to set the -vmarg -XX:+HeapDumpOnOutOfMemoryError in Product.ini file.
The OOM Error appaears again but no dump will be written.
Here is my ini file content:
Program Arguments:
-console
VM Arguments:
-Xmx448M
-Xms64M
-XX:+HeapDumpOnOutOfMemoryError
-Dorg.eclipse.update.reconcile=false
-Dlog4j.debug=true
-Dlog4j.configuration=file:./log4j.xml
Whats wrong? I would expect to find the dump in directory
where i started the exe file but it seems it was not generated
at all or where should i find in in FS?
Or whats maybe wrong with the vmarg?
Thanks a lot for a little help!

What flavor of JDK are you using?
"HeapDumpOnOutOfMemoryError"is an option from the Hotspot VM
If you are using another VM (likeIBM J9) it may not be there and as it is an "XX" JVM arg, it could be silently ignored

Related

How to set memory on a per project basis in sbt?

Currently, for a scala project I have to increase the memory to run its test via:
sbt -mem 2000 test
to set it to 2 GB.
I want to store the memory config in a file file inside the project (shared via git) so that every developer has this setting in place. Is that possible and if so how do I achieve that?
When I run:
sbt -v
[process_args] java_version = '8'
# Executing command line:
java
-Xms1024m
-Xmx1024m
-XX:ReservedCodeCacheSize=128m
-XX:MaxMetaspaceSize=256m
-jar
/usr/share/sbt/bin/sbt-launch.jar
I see that it defaults to 1024 MB, yet I fail to see where it gets that default values from nor how how to override it.
Sbt's man pages references as default: $sbt_mem, which is $(get_mem_opts $sbt_mem yet this also does not help my understanding on where to change it.
Try creating .jvmopts file at the root of the project like so
-Xmx2G
Also consider related answer https://stackoverflow.com/a/54725010/5205022

Unknown argument: -launcherDir GWT

I'm trying to debug in superDevMode using Tomcat instead of Jetty.
I followed this tutorial https://www.youtube.com/watch?v=w9270Yqt-5I
I added the argument -launcherDir to my debug configuration but when I run the configuration I get an unknown arguement error.
Console Output
Unknown argument: -launcherDir
Google Web Toolkit 7.1.12
CodeServer [-noprecompile] [-compileTest] [-bindAddress address] [-port port] [-workDir dir] [-allowMissingSrc] [-src dir] [module]
where
-noprecompile Disables pre-compilation of modules.
-compileTest Just compile the modules and exit.
-bindAddress The ip address of the code server. Defaults to 127.0.0.1.
-port The port where the code server will run.
-workDir The root of the directory tree where the code server willwrite compiler output. If not supplied, a temporary directorywill be used.
-allowMissingSrc Disables the directory existence check for -src flags.
-src A directory containing GWT source to be prepended to the classpath for compiling.
and
module The GWT modules that the code server should compile. (Example: com.example.MyApp)
I noticed a similar question GWT plugin for Intellij IDEA , but I think it went over my head a bit and a fix was not given.
Does anybody have a solution?
I came accross this issue,
Delete the web.xml file in the war folder and recreate a blank one
Fixed the issue for me.

Eclipse run error

When i try to run my code on Eclipse this error appears:
Usage: javaw [-options] class [args...]
(to execute a class)
or javaw [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-d32 use a 32-bit data model if available
-d64 use a 64-bit data model if available
-server to select the "server" VM
-hotspot is a synonym for the "server" VM [deprecated]
The default VM is server.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose:[class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -no-jre-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions with specified granularity
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions with specified granularity
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
i try to coment my entired code and this error still appear.
It seems you haven't set your java path correctly.
Setting Up Eclipse with Java 1.6 on Windows
How To Install and Get Started with Java Programming
Run eclipse in clean mode
Edit the eclipse.ini file located in your Eclipse install directory and insert -clean as the first line.
If this is happening to a specific project only and other projects are running fine then your default run configuration might have changed. You may try the following
- Run -> Run As -> 1 Java Application.
I fixed this issue by deleting some of my old runtime configurations. Eclipse then started automatically generating them again.

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

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.

sbt: Unable to specify application configuration in mingw

I am trying to launch an application using sbt's application launcher.
This application is defined as:
#!/bin/sh
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #"/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
However, when I launch it, it gives me this error:
$ ~/bin/cs n8han/giter8
Error during sbt execution: Could not find configuration file 'C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig'. Searched:
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
However, the file is present there. So, I think it's because of some quirk in the way sbt handles mingw file path.
Does anybody know how I can get it working?
In Cygwin I used
java -jar "`cygpath -m "$HOME/.conscript/sbt-launch.jar"`" "#file:///C:/Users/cvanvranken/.conscript/n8han/conscript/cs/launchconfig" "$#"
I expect you will be able to get yours to work with something similar, perhaps this:
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/Users/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
or
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar "#file:///C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/n8han/conscript/cs/launchconfig" "$#"
if those fail, you still definitely need to use the file:// protocol.
Also note the three directories it is searching in the error message
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/
file:/C:/Users/salil.wadnerkar/
file:/C:/MinGW/msys/1.0/home/salil.wadnerkar/.conscript/
no matter what you put in the launchconfig parameter, if it is not recognized then those directories are searched by default. So you could have gibberish in your parameter and still see the same exact error you are getting now.
you can set the launch config path relative to the .conscript folder -
java -jar /home/salil.wadnerkar/.conscript/sbt-launch.jar #n8han/conscript/cs/launchconfig "$#"