Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Can't start IDE anymore - perhaps due to recent update?(technical support)
Can't start IDE anymore - perhaps due to recent update? [message #1836097] Mon, 21 December 2020 02:10 Go to next message
Stephen Rigel is currently offline Stephen RigelFriend
Messages: 5
Registered: December 2020
Junior Member
Stopped and tried to restart IDE for the first time since it was updated a few days ago. Got an exit=1 error, and when I ran eclipsec.exe (what's the difference between the two executables?) I saw:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

Is there maybe a huge dump file somewhere it's trying to load into memory when it starts up?

I had been debugging a memory-hogging application at the time of the attempted reset. I had my eye on the task manager because of that, and think I remember seeing the IDE sitting at around a Gig of memory usage at the time I shut it down.

On StackOverflow I saw a number of answers to the error message that advised adding lines like these to my eclipse.ini file:
-Xms256m
-Xmx768m
-Xms1536M -Xmx1536M
-Xms4G -Xmx4G
-XX:MaxHeapSize=512m

I didn't know WHERE to add them to my .ini file, so tried them them and variations of them right after the "-vmargs" line.

I've also learned that P2BU files are backups of the eclipse.exe before updates, so tried swapping out for the penultimate one. No change.

Looked through all the folders under the Eclipse directory, but didn't find any over-sized files

Where do I go from here?

Here's my .ini:

-startup
plugins/org.eclipse.equinox.launcher_1.6.0.v20200915-1508.jar
--launcher.library
C:/Users/Rigel/.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.0.v20200915-1442
-product
org.eclipse.epp.package.jee.product
-showsplash
C:\Users\Rigel\.p2\pool\plugins\org.eclipse.epp.package.common_4.18.0.20201210-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-Dosgi.requiredJavaVersion=11
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-Dsun.java.command=Eclipse
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=11
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836114 is a reply to message #1836097] Mon, 21 December 2020 19:14 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
You should only have one Xmx and Xms parameter. It's pointless to have more than one of either of them. The last one will be the one used. The request for that number of KB corresponds to the 2048m value you have for Xmx. How much physical RAM do you have on the box this is running on? If the JVM wasn't able to allocate the amount of max memory you specified, it's because the OS didn't let it, and that would very likely be because there wasn't enough physical RAM to fulfill the request.
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836116 is a reply to message #1836114] Mon, 21 December 2020 22:34 Go to previous messageGo to next message
Stephen Rigel is currently offline Stephen RigelFriend
Messages: 5
Registered: December 2020
Junior Member
Thank you for responding. I was just using one of each at a time, and freestyling with some larger numbers as well. My physical ram is 16G, and it has sat at 7G in use while I try to start Eclipse. From the error message it seems to want 2G, so it looks to me like my computer can meet this by a wide margin.
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836118 is a reply to message #1836116] Mon, 21 December 2020 22:50 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
Yes, those numbers look ok. Did this error only happen once, every time you start it, or just occasionally?
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836122 is a reply to message #1836118] Tue, 22 December 2020 03:44 Go to previous messageGo to next message
Stephen Rigel is currently offline Stephen RigelFriend
Messages: 5
Registered: December 2020
Junior Member
Every time now; I can't access Eclipse at all anymore.

Getting it working again is my top choice, but I'm thinking if this can't be problem-solved, I'll try reinstalling in a separate directory and import all my projects. Is there a way to do it that I'm not having to figure out the project interdependencies, external libraries, git repositories, and server installations? I'm not great about getting all those pieces configured correctly, and it could be a long road getting back to where I was. Maybe I could overwrite certain files and directories from the non-working installation into a new one where I could avoid those steps?
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836126 is a reply to message #1836122] Tue, 22 December 2020 07:51 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
Is the eclipse.ini file exactly what you posted above?
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836133 is a reply to message #1836126] Tue, 22 December 2020 10:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Personally, I never use updates and so am guilty as a developer who doesn't test whether my projects are updatable or contribute to the overall utility. I see too much confusion and doubt and users with problems. P2 certainly has trouble if any of your applications has a feature evolution. And of course your chances of unupdating to determine why something worked on version X but not on version Y are very limited, particularly on a plane where the unupdate may be unable to redownload the old software even though you have the installations on disk and Eclipse has them in its plugins folder.

I always create a new installation from scratch, and use a Windows short cut to start Eclipse with the same defined workspace e.g. set my shortcut for 4.14 targets to:

E:\Tools\Eclipse\4.14\eclipse.exe -clean -data E:\Development\Rusa\Workspace -vm "%JAVA_HOME%\bin\javaw.exe" -vmargs -Xmx4g -XX:PermSize=100M -XX:MaxPermSize=300M -Xrunjdwp:server=y,transport=dt_socket,address=14143,suspend=n

Whenever you change Eclipse versions you get a warning that the Workspace was for a different Eclipse. Just click to continue. I have gone backwards and forwards many many times without problem. I really do not know what the point of the warning is; when there really is a problem there should be a migration. Of course taking a backup of the Workspace is a good idea and I used to do that but 5 years and many changes on I don't bother.

Running two Eclipses on the same Workspace is sensibly not allowed. Running two Eclipses with the same remote debug port (e.g. 14143) gives an obscure Java crash popup.

Regards

Ed Willink

Re: Can't start IDE anymore - perhaps due to recent update? [message #1836161 is a reply to message #1836133] Tue, 22 December 2020 20:48 Go to previous messageGo to next message
Stephen Rigel is currently offline Stephen RigelFriend
Messages: 5
Registered: December 2020
Junior Member
I think I'll adopt the practice of leaving my IDE un-updated in the future, as well. You gave me some things to try, thank you. Today I did a memory check, and found I was wrong when I said I'd went through all of Eclipse's files: I'd only looked in the program directory, but there are a lot of files within the project directory besides my particular project directories. Could there be a chance that there is some mega-data dump file Eclipse is trying to load on start?

With that in mind, I've come across running Eclipse from the command line with a '-clean' argument, which I tried without effect. There is also a '-clearPersistedState' argument suggested, which I have not tried. Does anyone recommend it or something else for this heap issue? Thank you.

Also, someone asked if the .ini file shared matched what I'm using now. I think so, but I've changed it so much I can't rightfully say. I'll post it again.
  • Attachment: eclipse.ini
    (Size: 0.92KB, Downloaded 79 times)
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836162 is a reply to message #1836161] Tue, 22 December 2020 20:58 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
So you're saying that with this eclipse configuration, you're still getting the exact same error, citing "Could not reserve enough space for 2097152KB object heap"?

And by the way, I almost always run with the absolute latest release of plugins, and update to the latest platform release very soon after each release.

[Updated on: Tue, 22 December 2020 20:59]

Report message to a moderator

Re: Can't start IDE anymore - perhaps due to recent update? [message #1836165 is a reply to message #1836162] Tue, 22 December 2020 22:44 Go to previous messageGo to next message
Stephen Rigel is currently offline Stephen RigelFriend
Messages: 5
Registered: December 2020
Junior Member
Yes.
Re: Can't start IDE anymore - perhaps due to recent update? [message #1836189 is a reply to message #1836165] Wed, 23 December 2020 16:03 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

'-clearPersistedState' was recently recommended to me as a a way to clean up obsolete icon references in 'nested' workspaces that fail to clean up automatically. Probably only necessary once every few years.

Regards

Ed Willink
Previous Topic:2020-12 Closes launched application when debug session killed
Next Topic:Default Eclipse Java - where is it installed?
Goto Forum:
  


Current Time: Thu Apr 18 02:50:39 GMT 2024

Powered by FUDForum. Page generated in 0.02602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top