Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » CDT parser OutOfMemoryError(Eclipse 2019-09 single file parsing)
CDT parser OutOfMemoryError [message #1817794] Fri, 29 November 2019 04:35 Go to next message
Eclipse UserFriend
FileContent fileContent = FileContent.createForExternalFileLocation(fileLocation);
            IScannerInfo scannerInfo = new ScannerInfo();
            IncludeFileContentProvider readerFactory = IncludeFileContentProvider.getEmptyFilesProvider();
            IASTTranslationUnit tu = GPPLanguage.getDefault().getASTTranslationUnit(fileContent, scannerInfo,
                readerFactory, null, ILanguage.OPTION_PARSE_INACTIVE_CODE, new DefaultLogService());
            System.out.println(tu.getRawSignature());


There is a java.lang.OutOfMemoryError when I use the code to parse a single file. Is it a bug or not?
  • Attachment: main.cpp
    (Size: 12.31KB, Downloaded 93 times)
  • Attachment: parser_error.png
    (Size: 104.37KB, Downloaded 152 times)
Re: CDT parser OutOfMemoryError [message #1817814 is a reply to message #1817794] Fri, 29 November 2019 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Don't know if it's a bug or not.
The file is rather complicated.
Try inserting the code in pieces until you encounter the problem.

I tried doing so and got to line 195 but it failed after that.
After the problem occurred, I had to delete the .cproject, .project files and .settings dir.
It was a nuisance recreating them.

Start a new project without the main.cpp file.
save the project files.
Add pieces from main.cpp until the error occurs.
There may be something obvious that you can fix.

You can also increase JVM heap and see if that helps.
https://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F
Re: CDT parser OutOfMemoryError [message #1817867 is a reply to message #1817814] Sun, 01 December 2019 22:52 Go to previous message
Eclipse UserFriend
Thanks for your reply. I have already report it to CDT team. You can check BugId 553613 to see.
Previous Topic:Can't export project to eclipse IDE
Next Topic:How to load a file content into a new editor tab
Goto Forum:
  


Current Time: Sun Jun 15 15:45:23 EDT 2025

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

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

Back to the top