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

Bug 341378

Summary: AtlLaunchHelper : transformed models disappear randomly
Product: [Modeling] MoDisco Reporter: Nicolas Bros <nicolas.bros>
Component: InfrastructureAssignee: Nicolas Bros <nicolas.bros>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hugo.bruneliere, modisco.web-inbox
Version: 0.9.0Flags: nicolas.bros: indigo+
Target Milestone: 0.9.0 M7   
Hardware: All   
OS: All   
Whiteboard:

Description Nicolas Bros CLA 2011-03-30 11:22:02 EDT
After using a discoverer based on an ATL transformation, the resulting model is opened in the MoDisco model browser. After a while, it disappears from the browser (the browser becomes empty).

These discoverers use AtlLaunchHelper, which uses org.eclipse.m2m.atl.drivers.emf4atl.EMFModelLoader to load the models for the ATL transformation. EMFModelLoader#finalize and ASMEMFModel#finalize are overridden in ATL in order to unload Resources when the GC kicks in.

I couldn't understand exactly what was happening, but there seems to be a race condition between the GC finalizers and other threads, leading to a premature unloading of the Resource currently displayed in the model browser.
Comment 1 Nicolas Bros CLA 2011-03-30 11:44:16 EDT
Fixed in revision 4209 by moving the contents of the ATL resource to a new XMIResourceImpl.
Comment 2 Hugo Bruneliere CLA 2011-08-18 08:02:16 EDT
Bug solved.