eclipse-modisco / org.eclipse.modisco

Eclipse Public License 2.0
0 stars 0 forks source link

OutOfMemoryError in StringSegment.writeAscii (347) #951

Open eclipse-modisco-bot opened 1 week ago

eclipse-modisco-bot commented 1 week ago

| --- | --- | | Bugzilla Link | 472713 | | Status | NEW | | Importance | P4 minor | | Reported | Jul 15, 2015 06:47 EDT | | Modified | Jul 15, 2015 06:49 EDT | | Version | 0.13.0 | | Reporter | EPP Error Reports |

Description

The following incident was reported via the automated error reporting:

code:                   2\
plugin:                 org.eclipse.core.jobs_3.7.0.v20141128-1953\
message:                An internal error occurred during: "MoDisco discoverer "org.eclipse.modisco.java.discoverer.projectToKDM" in progress...".\
fingerprint:            bca16fd0\
exception class:        java.lang.OutOfMemoryError\
exception message:      Java heap space\
number of children:     0\
\
java.lang.OutOfMemoryError: Java heap space\
at java.util.Arrays.copyOf(null:-1)\
at java.io.ByteArrayOutputStream.grow(null:-1)\
at java.io.ByteArrayOutputStream.ensureCapacity(null:-1)\
at java.io.ByteArrayOutputStream.write(null:-1)\
at org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(StringSegment.java:347)\
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSaveImpl.java:1022)\
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:255)\
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389)\
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1430)\
at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.initModels(AtlLaunchHelper.java:146)\
at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:187)\
at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:173)\
at org.eclipse.modisco.util.atl.core.internal.AtlLaunchHelper.runTransformation(AtlLaunchHelper.java:220)\
at org.eclipse.modisco.java.discoverer.internal.TranslateJavaModelToKdm.getKDMModelFromJavaModelWithCustomTransformation(TranslateJavaModelToKdm.java:87)\
at org.eclipse.modisco.java.discoverer.internal.TranslateJavaModelToKdm.getKDMModelFromJavaModelWithCustomTransformation(TranslateJavaModelToKdm.java:65)\
at org.eclipse.modisco.java.discoverer.DiscoverKDMModelFromJavaProject.discoverKDM(DiscoverKDMModelFromJavaProject.java:62)\
at org.eclipse.modisco.java.discoverer.DiscoverKDMModelFromProject.basicDiscoverElement(DiscoverKDMModelFromProject.java:55)\
at org.eclipse.modisco.java.discoverer.DiscoverKDMModelFromProject.basicDiscoverElement(DiscoverKDMModelFromProject.java:1)\
at org.eclipse.modisco.infra.discovery.core.AbstractDiscoverer.discoverElement(AbstractDiscoverer.java:93)\
at org.eclipse.modisco.infra.discovery.core.AbstractModelDiscoverer.discoverElement(AbstractModelDiscoverer.java:183)\
at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener.discovererElement(MoDiscoMenuSelectionListener.java:229)\
at org.eclipse.modisco.infra.discovery.ui.internal.actions.MoDiscoMenuSelectionListener$1.run(MoDiscoMenuSelectionListener.java:168)\
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)\

\

General Information:

reported-by:      \
anonymous-id:     0da6ec68-b8c0-4ff7-bab5-bcf4ec43991b\
eclipse-build-id: 4.5.0.I20141210-2000\
eclipse-product:  org.eclipse.epp.package.modeling.product\
operating system: Windows7 6.1.0 (x86_64) - win32\
jre-version:      1.7.0_71-b14

The following plug-ins were present on the execution stack (*):

  1. org.eclipse.core.jobs_3.7.0.v20141128-1953
  2. org.eclipse.emf.ecore_2.11.0.v20150318-0449
  3. org.eclipse.emf_2.6.0.v20150323-0420
  4. org.eclipse.emf.ecore.xmi_2.11.0.v20150318-0449
  5. org.eclipse.modisco.infra.discovery.core_0.13.0.201503131029
  6. org.eclipse.modisco.infra.discovery_0.13.0.201503131029
  7. org.eclipse.modisco.infra.discovery.ui_0.13.0.201503131029
  8. org.eclipse.modisco.java.discoverer_0.13.0.201503131029
  9. org.eclipse.modisco.util.atl.core_0.13.0.201503131029

Please note that:

Other Resources:

Thank you for your assistance.\ Your friendly error-reports-inbox.

This bug was created on behalf of gdupe@mia-software.com.

eclipse-modisco-bot commented 1 week ago

By Gregoire Dupe on Jul 15, 2015 06:49

The use of the option 'org.eclipse.emf.ecore.xmi.XMLResource.OPTION_FLUSH_THRESHOLD' may help to avoid such problems.

Workaround:

A source discoverer can use a large amount of memory. This depends of the discovered source code size. You can increase the memory of your Eclipse using the JVM option "-Xmx", cf :