ZeligsoftDev / CX4CBDDS

CX4CBDDS component modeling and generation tool
Apache License 2.0
8 stars 5 forks source link

Compare on Git view hangs after using Compare on Synchronize view. #500

Open eposse opened 7 months ago

eposse commented 7 months ago

Issue and tracking information

Developer's time Estimated effort to fix (hours):

Developer's Actual time spent on fix (hours)

Issue reporter to provide a detailed description of the issue in the space below

When the user compares a workspace model with another version using the Synchronize perspective, then closes the session, restarts it and does a compare between two commits in the Git perspective, the Comparison hangs.

Steps to reproduce

  1. Create a git repo
  2. Create a model and save it in the repo
  3. Make two branches (or one more than the main branch)
  4. Make one commit in each branch with non-conflicting model changes in each
  5. Switch to the Papyrus perspective
  6. Right-click on the model
  7. Select "Compare With ... > Branch, Tag or Reference ..."
  8. Select a different branch than the one that's checked out
  9. Click [Compare]
  10. If asked to switch to the Synchronize View, select [Yes]
  11. Unfold the project until you see the .uml file
  12. Right-click on the .uml file and select "Open in Compare Editor"
  13. Wait until the comparison finishes. Close the Compare Editor and end the session.
  14. Start a new session.
  15. Switch to the Git Perspective.
  16. In the Git History View, select the two branches to compare (if only one branch is visible, select, in the Git History View toolbar, the button whose tooltip says "Change which commits to show: [...]" until you see the branches).
  17. Right-click and select "Compare with Each Other".

Expected result

The Git Compare view should complete the comparison and display it.

Actual result

Compare hangs with the "Model differences" viewer displaying the message "Computing Model Differences" and the progress bar showing no progress. Also, the switch pane that is supposed to show the differences just displays the message "Please wait for the comparison computation to finish...". No progress is made. Attempting to click elsewhere results in Eclipse hanging.

Environment

Papyrus CX 2.6 on Papyrus 4.8 Ubuntu 20.04

eposse commented 7 months ago

It looks like it happens even if the Synchronize view is not involved at all. I experienced a deadlock also in the following scenario:

  1. Start in a fresh, new workspace
  2. Clone or make a new git repo
  3. Create a model
  4. Make changes in two branches
  5. In the Git History view, select two commits from different branches
  6. Right-click on "Compare with Each Other"

At this point it computes the differences and you get the result.

  1. Close the compare view.
  2. Possibly close and restart the session.
  3. Switch back to the Git Perspective.
  4. In the Git History view, select two commits from different branches
  5. Right-click on "Compare with Each Other"

Here it may hang again while computing the differences.