OMG, eclipse (it's Gallileo, but with previous versions I also had such problems) crashed again, silently as always. That can happen one time per week, but this is really annoying. All I have now is a crash log. Are there any ways of discovering the true reason of these crashes?
Header of crash log, can't see anything useful:
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d80f8d4, pid=1388, tid=3180
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_12-b04 mixed mode)
# Problematic frame:
# V [jvm.dll+0xcf8d4]
#
I used to have these kind of silent crashes on 64-bit Linux. For me it was fine after adding these lines to my eclipse.ini (see corresponding Eclipse and Sun bug entries):
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
-XX:CompileCommand=exclude,org/eclipse/jdt/internal/compiler/lookup/ParameterizedMethodBinding,<init>
For Galileo, I would recommend trying to launch it with the most recent JVM possible;
That does not mean you have to compile your projects with that JDK: you can declare as many JDK you want within your eclipse session.
(source: benmccann.com)
(although this picture shows jdk1.5, you can launch eclipse with any other JVM)
See this eclipse.ini for more details.
As this recent thread illustrates, that can happens with an "old" eclipse.ini, so it is worth checking and updating the ini file.
This is a bug in the Sun's Java VM which Eclipse triggers. These are notoriously hard to figure out. I suggest this approach:
Install a newer VM (1.5.0 16 or 1.6)
Disable all plugins you've installed
I had a similar issue with Groovy on Linux. I don't remember my solution but try a different version of Groovy in this case.
Related
I use ubuntu16.04 in VMware for learning Hadoop. The eclipse is Eclipse IDE for Java Developers at 2020.03 for linux_64.
And when use eclipse to write some java code, the IDE usually exits by itself without any error. And the eclipse is too slow when I use it. I guess that whether the memory is not enough for using IDE. But I found the memory is free when I check it. I allocated 2G of memory for ubuntu16.04.
And I search for this problem on web. I found many people believe the problem is eclipse caused. So they come up with a way to edit eclipse.ini.
-Dorg.eclipse.swt.browser.DefaultType=mozilla
Add this command to the last line of eclipse.ini.
Unfortunately, it doesn't work. So Do u know why? Should I allocate more memory for VMware?
I'm running Leiningen in Counterclockwise in Eclipse (Windows, if it's relevant).
The thing is, when I run Leiningen from the command prompt, it runs just fine. However when I run it inside Eclipse, although it runs fine it haunts me with the following warning:
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this release.
The only relevant thing I found on the Internet is this. However the solution doesn't work for me as I don't have this line in lein.bat file. I've tried fiddling with Java options in lein.bat to enable TieredCompilation explicitly with no avail. I'm trying to understand - what's different when Eclipse runs lein, compared to when I run it from the prompt, how does it run it? How do I hide this message?
EDIT: this warning seems to appear only in 32-bit JVM; for anyone having the same problem, using 64-bit JVM solves it. For anyone that as to use 32-bit JVM for whatever reason, I'm still looking for a good solution.
(converted from comment as I have to add additional info)
CCW uses its own version of Leiningen - for example, when I execute lein version from inside CCW I get 2.5.1, but if I drop to the command line and execute the same command I get 2.7.1. In my install (Neon + CCW - couldn't make the standalone CCW install work) there's a leiningen-standalone.jar in C:\eclipse\plugins\ccw.core_0.35.1.STABLE001. There may be a way to get Counterclockwise to use a separate version of Leiningen - perhaps more knowledgeable users will chime in with how to do this.
Also note that in the Windows install of Leiningen the LEIN_JVM_OPTS environment variable isn't defined at all in lein.bat, although it is used when invoking Java. Thus it seems you have two options:
Less-preferred option: edit lein.bat and add the definition of LEIN_JVM_OPTS, probably somewhere near the beginning of the file. This has the disadvantage that when you upgrade Leiningen you'll lose your definition of LEIN_JVM_OPTS and have to find this message again.
More-preferred option: since this is Windows you can go into Control Panel, type "environ" in the search box, then click on on the "Edit environment variables for your account" link which comes up under System (or click on "Edit the system environment variables" if you like). Create a new entry for LEIN_JVM_OPTS, specifying something like
-XX:-TieredCompilation
and you should be good to go. While I don't know for certain if this environment variable is used by the standalone .jar version of Leiningen I'd certainly hope and expect it would be.
Best of luck.
I installed sbt 0.13.1 from http://www.scala-sbt.org through the msi package.
When I try to start it through a command prompt i get this error
C:\Users\megatron>sbt
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
So I followed the recommendation in the setup notes
and added/changed this in the C:\Program Files (x86)\sbt\conf\sbtconfig.txt file.
-Xmx1536M
-XX:MaxPermSize=256m
-XX:ReservedCodeCacheSize=128m
-Xss1M
-XX:+CMSClassUnloadingEnabled
This doesn't help either and I still get the same error.
It seems you should not have white space characters in the installation path to sbt. You have one in Program Files. Try installing into a different location.
[EDITED, see below]
workaround for me: first try rebooting Windows
I've seen this problem in the past on Windows. Now again with sbt-0.13.5 on Windows 8.1.
By default the sbt installer installs to C:/Program Files (x86)/sbt. I also tried C:/sbt and got the same error while my system appeared to have almost 2G RAM still available. Next, without changing anything else I rebooted and sbt worked from C:/sbt. Then I re-installed using the default C:/Program Files (x86)/sbt path and still sbt works. Of course rebooting isn't a solution.
See related answer. The problem may be that when you are running sbt you are picking up 32-bit JRE (probably via C:/Windows/System32) instead of 64-bit in your path (check with java -version). Apparently the problem is then that although there may be enough memory overall it might not be contiguous that the JVM is requesting.
I installed Valgrind on SUSE Linux SLES 11SP2 under my home directory and added it to the path. I then installed eclipse Juno for C/C++ Service Release 2 Build id: 20130225-0426 and installed the Valgrind plugin.
When I try to create a profile configuration with Valgrind I get an error message:
"[Valgrind Options]: Couldn't determine version of Valgrind", and though it allows me to make the configuration it prevents me from proceeding by greying out all buttons except for the close button.
I know I am missing something trivial like defining the location of the Valgrind executable in eclipse, but I was unable to find it, not in the project properties nor in the window preferences.
I will appreciate your help.
Ok, I figured it out.
I moved the Valgrind installation to a new shared location, and tried it out with a new computer (same architecture).
It did not affect the original computer I installed it on, but Valgrind had a problem with the new one, as indicated in the README (and I meanwhile forgot):
“Important! Do not move the valgrind installation into a place different from that specified by --prefix at build time. This will cause things to break in subtle ways, mostly when Valgrind handles fork/exec calls.”.
This caused Valgrind to break when run standalone with the message:
“valgrind: failed to start tool 'memcheck' for platform 'amd64-linux': No such file or directory”,
however when running Valgrind from eclipse it probably translated it to the message:
"[Valgrind Options]: Couldn't determine version of Valgrind".
In short: Do not move the Valgrind installation but re-install it. And this message from eclipse indicates that something bad happened with the installed Valgrind and not that it cannot find it.
I am getting the same error but its not caused by the explanation you have given.
You can get this error if you are using valgrind on mac os x because valgrind is usually not installed in the directory eclipse is looking for. In order to fix the issue on mac, you need to make a symbolic link to the valgrind location by
typing ln -s valgrind_location /usr/bin/valgrind. Note this differs from what are in the directions on eclipse's site http://wiki.eclipse.org/Linux_Tools_Project/Valgrind/User_Guide. For some reason they have the call backwards on their site. Once I made this correction valgrind worked correctly from within Eclipse.
So on macs at least the error that it can't determine the version of valgrind at least matches up with eclipse not being able to find the file.
How do YOU debug a Scala program?
I mean YOU as in the person posting the Answer :) Please answer only from personal experience, not from stuff you've heard or read on the Internet. You should not believe everything you read on the Internet, especially tales of complex open-source software configurations that actually work :-)
The are many Java tools which claim to support Scala in some way or another, but I have so far struck out in trying to get any one of them to actually let me set a breakpoint in Scala code and step through it. These are big, major open-source IDEs I'm talking about here.
The main problem in getting a debugger to work seems to be the "version hell" with fast-changing IDEs, Plug-Ins, JDKs, and the Scala language itself.
Hence, the more detailed re-statement of the question is appropriate: What is the exact version number of the IDE, Plug-In, JDK, Scala, and even Operating System, that you are successfully using?
My question is related to this one, but wider in scope:
How To: debug Scala code when outside of an IDE
Thanks
In our development we use IntelliJ IDEA 9.0.1 which is available by the link below:
http://www.jetbrains.com/idea/download/
with Scala plugin installed:
http://confluence.jetbrains.net/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin
All you need is to have project with Scala sources (probably, mixed with Java or other JVM-based languages) opened. You can compile it and run as Java application, maven goal etc. or connect to the remote application if it has been run in debug mode.
See IntelliJ help for details of adjusting debug configuration.
Cheers!
Ilya
I've worked with Eclipse and the Scala plugin for it. It works somewhat ok, if you can overlook the fact that it doesn't remember the configuration for your Scala application on the next run.
I debug my Scala programs by running relevant parts of it on the REPL, as to verify what it is really doing. Other than that, the good old println or logs.
Digressing here a bit, it has been a rare thing in my life a situation where step-in debuggers were actually required -- and, then, mostly for assembler code, though languages where testing snippets of code is difficult for some reason were more likely to require it than others which weren't.
OS: xUbuntu(GNU/Linux) 9.10
JDK:
java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
(which is the Java-6-sun-version, used by the xUbuntu-installer).
Eclipse: 3.5.1 Build id: 20090920-1017
Scala-Plugin 2.7.7final
Scala 2.7.7
If possible: println-Statements, because eclipse is often tricky to invoke (does not find the main class, even after complete rebuild, closing/opening project, deleting old class-Files). The latest search for a problem ended when I 'deleted all bookmarks' - suddenly I was allowed to run the program.
Curious observation: class Bruch was what I tried to run, but eclipse allways mentioned 'Bruc' and named the runtime-configuration like this. Adding and removing characters reflected in the generated name accordingly (Bruc => Bru).