Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 487119 - Compare reads/loads models which were not selected for compare causing instability
Summary: Compare reads/loads models which were not selected for compare causing instab...
Status: CLOSED FIXED
Alias: None
Product: EMFCompare
Classification: Modeling
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: PC All
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Alexandra Buzila CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-03 08:46 EST by Ronan Bar CLA
Modified: 2016-04-19 06:34 EDT (History)
5 users (show)

See Also:


Attachments
Test Models (1.63 KB, application/zip)
2016-02-03 08:46 EST, Ronan Bar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ronan Bar CLA 2016-02-03 08:46:56 EST
Created attachment 259524 [details]
Test Models

Using EMF Compare 3.1.1 and 3.0.1 (at least I haven't checked other versions) EMF compare is reading in model resources that have nothing todo with the compare operations. If one of these other resources has an error then the compare will fail with "Problems occured which computing the synchronization model". This means I can only perform compares when I have only correct models in a project. This is a huge restriction and a big problem for novice users. It also points to an error in the loading of resources within EMF Compare in that models outside of the compare set are being loaded unnecessarily. 

Consider the attached zip. If I try to compare model.uml with model2.uml the compare will work as the unrelated models ModelWithDependecy.uml and ModelDependency.uml are correct. No problem here.

Now If I restart Eclipse and delete the model ModelDependency.uml which is required by ModelWithDependecy.uml and run compare on model.uml with model2.uml I will get an error "Problems occured which computing the synchronization model". Note this error will only occur on the first run of the compare, subsequent runs will work. Restarting eclipse will cause the compare to fail again once.

I have marked the bug as critical as even the smallest error in unrelated models causes complete failure in EMF Compare. In some causes the compare blocks and never finishes when the unrelated model(s) has unavailable pathmap resources.
Comment 1 Alexandra Buzila CLA 2016-02-03 09:05:47 EST
Hello Ronan, 
Thank you for the BR. I will take a look at the issue ASAP.
Comment 2 Laurent Delaigue CLA 2016-02-03 10:27:45 EST
This seems to be the same as 471045
Comment 3 Alexandra Buzila CLA 2016-02-08 12:15:57 EST
We analyzed the problem and decided to only display in the comparison view the errors that come from resources that we know for sure are participating in the comparison and affect the comparison's result.

All other errors will be logged, but the error view won't be opened by default if we were able to successfully finish the comparison.


(In reply to Laurent Delaigue from comment #2)
> This seems to be the same as 471045
You are right, Laurent, although bug 471045 also describes an additional unrelated problem (SynchronizedResourceSet vs ResourceSet loading behavior).
Comment 4 Eclipse Genie CLA 2016-02-12 06:05:56 EST
New Gerrit change created: https://git.eclipse.org/r/66484