eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[editors] NPE in CS2ASConversion.garbageCollect #1617

Open eclipse-ocl-bot opened 3 hours ago

eclipse-ocl-bot commented 3 hours ago

| --- | --- | | Bugzilla Link | 478515 | | Status | UNCONFIRMED | | Importance | P3 normal | | Reported | Sep 28, 2015 05:19 EDT | | Modified | Sep 28, 2015 06:25 EDT | | Reporter | EPP Error Reports |

Description

The following incident was reported via the automated error reporting:

code:                   0\
plugin:                 org.eclipse.ocl.xtext.base_1.0.0.v20150211-0656\
message:                QVT Imperative Editor linking error\
fingerprint:            12e045c0\
exception class:        org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException\
exception message:      index=20, size=19\
number of children:     0\
\
org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=20, size=19\
at org.eclipse.emf.common.util.BasicEList.basicGet(BasicEList.java:363)\
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.hasNext(EContentsEList.java:515)\
at org.eclipse.emf.ecore.util.EContentsEList$FeatureIteratorImpl.next(EContentsEList.java:595)\
at org.eclipse.emf.common.util.AbstractTreeIterator.next(AbstractTreeIterator.java:133)\
at org.eclipse.emf.ecore.util.EcoreUtil$CrossReferencer.crossReference(EcoreUtil.java:1764)\
at org.eclipse.ocl.xtext.base.cs2as.CS2ASConversion$1.<init>(CS2ASConversion.java:329)\
at org.eclipse.ocl.xtext.base.cs2as.CS2ASConversion.garbageCollect(CS2ASConversion.java:327)\
at org.eclipse.ocl.xtext.base.cs2as.CS2AS.update(CS2AS.java:639)\
at org.eclipse.ocl.xtext.base.utilities.CS2ASLinker.afterModelLinked(CS2ASLinker.java:84)\
at org.eclipse.xtext.linking.impl.AbstractCleaningLinker.linkModel(AbstractCleaningLinker.java:54)\
at org.eclipse.xtext.resource.XtextResource.doLinking(XtextResource.java:299)\
at org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLinking(LazyLinkingResource.java:108)\
at org.eclipse.ocl.xtext.essentialocl.utilities.EssentialOCLCSResource.doLinking(EssentialOCLCSResource.java:326)\
at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:267)\
at org.eclipse.xtext.resource.XtextResource.updateInternalState(XtextResource.java:257)\
at org.eclipse.xtext.resource.XtextResource.update(XtextResource.java:238)\
at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.doReconcile(XtextDocumentReconcileStrategy.java:149)\
at org.eclipse.xtext.ui.editor.reconciler.XtextDocumentReconcileStrategy.reconcile(XtextDocumentReconcileStrategy.java:66)\
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.doRun(XtextReconciler.java:447)\
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.access$3(XtextReconciler.java:427)\
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:368)\
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler$1.process(XtextReconciler.java:1)\
at org.eclipse.xtext.util.concurrent.IUnitOfWork$Void.exec(IUnitOfWork.java:37)\
at org.eclipse.xtext.resource.OutdatedStateManager.exec(OutdatedStateManager.java:121)\
at org.eclipse.xtext.ui.editor.model.XtextDocument$XtextDocumentLocker.modify(XtextDocument.java:419)\
at org.eclipse.xtext.ui.editor.model.XtextDocument.internalModify(XtextDocument.java:153)\
at org.eclipse.xtext.ui.editor.reconciler.XtextReconciler.run(XtextReconciler.java:365)\
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)\

\

General Information:

reported-by:      Adolfo SBH\
anonymous-id:     ee6a7cf4-6277-45ce-b349-ac81306b3e3f\
eclipse-build-id: 4.5.0.I20150203-1300\
eclipse-product:  org.eclipse.epp.package.committers.product\
operating system: Windows7 6.1.0 (x86_64) - win32\
jre-version:      1.7.0_45-b18

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

  1. org.eclipse.core.jobs_3.7.0.v20150115-2226
  2. org.eclipse.emf.common_2.11.0.v20150123-0347
  3. org.eclipse.emf_2.6.0.v20150123-0357
  4. org.eclipse.emf.ecore_2.11.0.v20150123-0347
  5. org.eclipse.ocl.xtext.base_1.0.0.v20150211-0656
  6. org.eclipse.ocl_3.5.0.v20150120-1323
  7. org.eclipse.ocl.xtext.essentialocl_1.0.0.v20150210-2029
  8. org.eclipse.xtext_2.8.0.v201502030924
  9. org.eclipse.xtext.ui_2.8.0.v201502030924
  10. org.eclipse.xtext.util_2.8.0.v201502030924

Please note that:

Other Resources:

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

This bug was created on behalf of ed@xxxxxxxxxxxx.

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 28, 2015 05:44

The BasicIndexOutOfBoundsException is a shrinkage during EcoreUtil$CrossReferencer.crossReference is odd:

The obvious bug in EcoreUtil is unlikely.

Possible mechanism: a 'list' of WeakReferences is traversed and it tidies itself up by pruning a stale WeakReference. The shrink in an inner loop causes the index problem in an outer loop.

Need to review all WeakXXX tidy ups. May be necessary to queue the tidy ups to a thread/manullayPolledRootFacility that tidies up while concurrent activity is inhibited.

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 28, 2015 06:15

Suspicious clean ups:

org.eclipse.ocl.pivot.internal.complete.AbstractListeners.doFlush()\ org.eclipse.ocl.pivot.internal.complete.CompleteClasses.CollectionCompleteClassImpl.findCollectionType\ org.eclipse.ocl.pivot.internal.complete.CompleteClasses.MapCompleteClassImpl.findMapType\ org.eclipse.ocl.pivot.internal.complete.PartialClasses.findSpecializedType\ org.eclipse.ocl.pivot.internal.library.executor.AbstractIdResolver.weakGet\ org.eclipse.ocl.pivot.internal.library.executor.ExecutableStandardLibrary.weakGet

eclipse-ocl-bot commented 3 hours ago

By Ed Willink on Sep 28, 2015 06:25

(In reply to Ed Willink from comment #1)

May be necessary to queue the tidy ups to a thread/manullayPolledRootFacility that tidies up while concurrent activity is inhibited.

We cannot really know where an iterator is running and since they are not synchronized we cannot guarantee that a concurrent thread is safe.

We are only cleaning up so its good to do eventually but a bit of delay is no problem. Provide a utility that is called when nothing is happening; end of an edit.

WeakCleaner mutex protects:

User code can synchronize on the WeakCleaner.