omecra / de.omecra.oedt.updatesite

OEDT Plug-in Updatesite - Issue Repository for OEDT
12 stars 0 forks source link

Out of memory exception while building source model #179

Closed lievendf closed 8 months ago

lievendf commented 9 months ago

Hi,

I'm having an OutOfMemory exception while building the source model of a project:

!ENTRY org.eclipse.core.jobs 4 2 2024-02-06 09:49:04.127
!MESSAGE An internal error occurred during: "Parse Files for Project: xxx".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
    at java.base/java.lang.StringCoding$StringDecoder.decode(StringCoding.java:201)
    at java.base/java.lang.StringCoding.decode(StringCoding.java:344)
    at java.base/java.lang.String.<init>(String.java:592)
    at java.base/java.lang.String.<init>(String.java:614)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceFileParser.parseFile(OedtSourceFileParser.java:73)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceFileParser.parseFile(OedtSourceFileParser.java:59)
    at de.omecra.oedt.internal.core.project.model.builder.OedtSourceFileParser$1.run(OedtSourceFileParser.java:307)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Current eclipse memory settings: -Xms256m -Xmx1024m

Any idea where to start looking for the cause?

Regards, Lieven

lievendf commented 9 months ago

I've changed a couple of things and now it works

Hard to tell what did the trick, although only increasing the Xmx didn't help (I got a StackOverflow exception). So case closed...

lievendf commented 9 months ago

It appears the issue isn't solved after all... Still occasional OutOfMemory and StackOverflow exceptions...

!ENTRY org.eclipse.core.jobs 4 2 2024-02-06 15:12:32.235
!MESSAGE An internal error occurred during: "Oedt Dependency Build for Project: xxx".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
    at de.omecra.oedt.core.OedtFile.getFileContent(OedtFile.java:52)
    at de.omecra.oedt.core.OedtFile.checkSHA(OedtFile.java:90)
    at de.omecra.oedt.internal.core.project.builder.OedtDeltaBuild.checkChanges(OedtDeltaBuild.java:105)
    at de.omecra.oedt.internal.core.project.builder.OedtDependencyBuild.getDeltaBuild(OedtDependencyBuild.java:257)
    at de.omecra.oedt.internal.core.project.builder.OedtDependencyBuild$1.run(OedtDependencyBuild.java:173)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Not sure if the StackOverflow exception originates from OEDT though...

!ENTRY org.eclipse.core.jobs 4 2 2024-02-06 11:13:49.436 !MESSAGE An internal error occurred during: "Validating xxx". !STACK 0 java.lang.StackOverflowError at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source) at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source) at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source) ... at org.apache.xerces.impl.xpath.regex.RegularExpression.matchString(Unknown Source)

lneumeier commented 8 months ago

Both call-stacks point to reading the content of a file. Do you have a very big file inside your project?

lievendf commented 8 months ago

There are some git repositories with large pack files in there. They should be ignored/excluded but I'll check again. Also some large log files apparently, I'll remove them. I'll report back!

lievendf commented 8 months ago

I removed the large log files, checked that .git folders are excluded using resource filters and disabled Eclipse validators, as these seemed to be problematic on some files as well. Seems fixed...