Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340985

Summary: Applying a SemanticModification throws StackOverflowError
Product: [Modeling] TMF Reporter: Bernd Kolb <kolb>
Component: XtextAssignee: Jan Koehnlein <jan>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: jan, sven.efftinge, tmf.xtext-inbox
Version: 2.0.0Flags: sven.efftinge: indigo+
Target Milestone: M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Errorlog none

Description Bernd Kolb CLA 2011-03-25 12:59:51 EDT
Build Identifier: 2.0.0.v201103151224 - the one used at Eclipsecon

Applying a SemanticModification (Uncapitalize name) in the Domainmodel example throws StackOverflowError. This seems however to be not specific to that very example but a general problem.

Reproducible: Always

Steps to Reproduce:
1. Use the Domainmodel example as provided by Xtext
2. create a new File with the following content
entity Person {
	age : int
	op PrintAge() : String { 
		"This person is of age " + age
	}
	
	op print() : String {
		PrintAge
	}

}

entity Car {
	
	owner: Person
	
	op printAgeOfOwner() : String { 
		owner.PrintAge()
	}
	
}

3. try to fix the waring using the quickfix
--> Eclipse throws StackOverflowError
Comment 1 Bernd Kolb CLA 2011-03-25 13:00:51 EDT
Created attachment 191924 [details]
Errorlog
Comment 2 Jan Koehnlein CLA 2011-04-11 08:34:11 EDT
The error occurs when unloading the inferred model before linking: Using a tree iterator, we set the EObject URI and remove all adapters and on all children first and eventually on the root element. When removing the root element's DefaultTextEditComposer - a *content* adapter - we go into a nice cycle, as it tries to resolve the children which in turn try to resolve the parent.

Another issue appears with Ecore: EPackages sets the ePackage on their children to null when being proxified, thus resolving them. So we cannot proxify ecore models starting with the children. 

I fixed the GenericUploader and added a test.
Comment 3 Karsten Thoms CLA 2017-09-19 17:49:21 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 4 Karsten Thoms CLA 2017-09-19 18:00:19 EDT
Closing all bugs that were set to RESOLVED before Neon.0