Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer problem with large project(Can not open large project because Indexer dies)
Indexer problem with large project [message #1804960] Wed, 03 April 2019 14:46 Go to next message
Eclipse UserFriend
I am running Eclipse 2018-12 on windows 10 machine with 64GB of memory. I have very large C++ project (8993 .cc file and 3241 header files) that is normally built on a Linux machine. I have imported the project to windows machine with Cygwin GCC installed on it. I just want to browse the source files, I am NOT building the project on this windows machine. I end up with this error

"An internal error occurred during: "Compacting resource model".
Java heap space

I have allocated 32GB of memory allocate to Eclipse heap (-Xmx32768m) in the eclipse.ini file but eclipse dies trying to build the index with the C/C++Indexer at 52%.
After 45% it seems parsing is very very slow it took 30 minutes to get to up to 48% at which point at Eclipse memory usage is 16.5GB. When C/C++Indexer is at 50% Eclipse memory usage jumps 18.4GB and when C/C++Indexer is at 52% Eclipse memory usage is around 35.542GB. it stays at 52% and memory usage falls to 34.7 GB and appears to be hung but eventually errors out with
"An internal error occurred during: "Compacting resource model".
Java heap space
Then memory use show around 26GB.

Details:
Version:
Eclipse 2018-12
org.eclipse.core.runtime=2
org.eclipse.platform=4.10.0.v20181206-0815

Preferences for Indexer
Limit relative to the Maximum heap space: 10%
Absolute limit: 3072 MB


Eclipse.Ini file
-startup
plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar
--launcher.library
C:\Users\210066433\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.900.v20180922-1751
-product
org.eclipse.epp.package.cpp.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:/Program Files/Java/jdk1.8.0_192/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms1024m
-Xmx32768m
--add-modules=ALL-SYSTEM
-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/


Log
!MESSAGE Error while parsing /PDSLoc/otc/source/InteractiveTest/testStateMachine.cc.
!STACK 0
java.lang.reflect.InvocationTargetException
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.getMaskedException(AbstractIndexerTask.java:1206)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.swallowError(AbstractIndexerTask.java:1192)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseFile(AbstractIndexerTask.java:1128)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseLinkage(AbstractIndexerTask.java:910)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.runTask(AbstractIndexerTask.java:572)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.run(PDOMIndexerTask.java:164)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.run(PDOMRebuildTask.java:94)
at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(PDOMIndexerJob.java:160)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.OutOfMemoryError: Java heap space
Root exception:
java.lang.OutOfMemoryError: Java heap space

!ENTRY org.eclipse.core.jobs 4 2 2019-04-03 14:08:55.988
!MESSAGE An internal error occurred during: "Update Monitor".
!STACK 0
java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects

!ENTRY org.eclipse.core.jobs 4 2 2019-04-03 14:08:55.988
!MESSAGE An internal error occurred during: "Synchronizing Relevant Tasks".
!STACK 0
java.lang.OutOfMemoryError: Java heap space

!ENTRY org.eclipse.core.jobs 4 2 2019-04-03 14:08:55.988
!MESSAGE An internal error occurred during: "Compacting resource model".
!STACK 0
java.lang.OutOfMemoryError: Java heap space

!ENTRY org.eclipse.core.jobs 4 2 2019-04-03 14:08:55.988
!MESSAGE Unhandled error
!STACK 0
java.lang.OutOfMemoryError: Java heap space





Re: Indexer problem with large project [message #1805328 is a reply to message #1804960] Thu, 11 April 2019 14:38 Go to previous messageGo to next message
Eclipse UserFriend
Any suggestions on how to go about fixing it ?
Has anybody out there worked on the Eclipse indexing code that can throw some light on it and the complexity of fixing this issue. I see some very old posts about indexing issues that were "fixed".
I was able to open the project in NetBeans (uses about 7GB of memory) but would like to see it fixed in Eclipse.
I am Visual Studio guy and just started using Eclipse and have never looked at the Eclipse source code but just wondering how complex is this indexing logic!
Do I just get the source and try fixing it myself or are there people out there with more experience in this part of the code that can help.
Please help.
Thanks
Re: Indexer problem with large project [message #1805330 is a reply to message #1805328] Thu, 11 April 2019 18:11 Go to previous messageGo to next message
Eclipse UserFriend
Not sure how to fix it but you might get around it by disabling the Indexer for the project.

from Project Explorer:
right click project ->> Properties --> C/C++ General --> Indexer
check: Enable project specific settings
uncheck: Enable indexer

Of course, you wouldn't then have the indexer.

Later you can try playing with the Indexer settings for the project


Re: Indexer problem with large project [message #1805376 is a reply to message #1805330] Fri, 12 April 2019 14:49 Go to previous messageGo to next message
Eclipse UserFriend
Thanks.
Yes, I have tried it with indexing off and it does work but makes navigating through the code hard.

[Updated on: Fri, 12 April 2019 14:50] by Moderator

Re: Indexer problem with large project [message #1819523 is a reply to message #1805376] Thu, 16 January 2020 12:15 Go to previous message
Eclipse UserFriend
Try to place the xms, xmx options right after the -vmargs option . Fox example

-vmargs
-Xms512m
-Xmx4096m
Previous Topic:Problem with Debugging a Remote Application
Next Topic:Problem with installing plugins in Eclipse
Goto Forum:
  


Current Time: Tue Jun 24 22:55:50 EDT 2025

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

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

Back to the top