Bug 530181 - Eclipse freezes when selecting a "Select" widget after editing a "Text" widget in properties view
Summary: Eclipse freezes when selecting a "Select" widget after editing a "Text" widge...
Status: VERIFIED FIXED
Alias: None
Product: EEF
Classification: Modeling
Component: User Interface (show other bugs)
Version: 2.0.0   Edit
Hardware: PC Windows 7
: P3 blocker
Target Milestone: 2.0.1   Edit
Assignee: Pierre-Charles David CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2018-01-23 08:05 EST by Guillaume Doux CLA
Modified: 2018-02-02 11:24 EST (History)
2 users (show)

See Also:


Attachments
Sirius project to reproduce the problem (18.54 KB, application/x-zip-compressed)
2018-01-23 08:05 EST, Guillaume Doux CLA
no flags Details
Sample project to try to reproduce the issue (3.28 KB, application/zip)
2018-01-25 08:19 EST, Pierre-Charles David CLA
no flags Details
Video showing the failure to reproduce (440.68 KB, video/mp4)
2018-01-25 08:20 EST, Pierre-Charles David CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Doux CLA 2018-01-23 08:05:13 EST
Created attachment 272371 [details]
Sirius project to reproduce the problem

The bug is reproduced on windows 7 only (not on windows 10).

Sirius 5.1.0
EEF 2.0.1

In a Sirius properties view, when a text widget is "active" (cursor inside the text box - after a modification of it's value), the selection of a "select" widget right after the text box makes Eclipse flicker and freeze. 
Then, Eclipse should be killed to exit.

Note 1 : if the user click outside the textbox after the edition or tap "Enter" before clicking on the "select" widget everything works as expected.

Note 2 : if we debug the operation with a step in the EEFSelectLifecycleManager$EEFSelectLabelProvider getText(Object) method and go step by step on the first rounds, Eclipse do not freeze.

The attached file contains a sample family project modified to add a properties view for the "Person" class with a text widget for "name" editing and a "child" select widget to reproduce the bug.
Comment 1 Pierre-Charles David CLA 2018-01-23 08:48:37 EST
I can't reproduce under Linux, but it's probably related to the events sent by the SWT widgets. We've already hit some system-specific corner cases where the events we expect are not sent, or not in the same way/same order.
Comment 2 Pierre-Charles David CLA 2018-01-25 08:19:44 EST
Created attachment 272404 [details]
Sample project to try to reproduce the issue

I can't reproduce using this simple sample project, even under Windows 7.
Comment 3 Pierre-Charles David CLA 2018-01-25 08:20:51 EST
Created attachment 272405 [details]
Video showing the failure to reproduce

As can be seen on the video, there is indeed a graphical "glitch" when switching from the text widget to the combo, but no freeze, deadlock or crash.
Comment 4 Pierre-Charles David CLA 2018-01-26 02:40:13 EST
Reproduced under Windows 7 (inside a VM), using the first attached example. I'll try to reproduce using a simpler VSM.

What seems to happen:
* the combo opens;
* "at the same time" (it's in the same thread, but probably a queued SWT event which gets executed after the combo is opened), we lose the focus in the text field, which triggers the execution of the associated edition behavior (in this case, "Set Value" on the name of the person);
* this model change triggers a refresh of the widgets, including the combo.
* for the combo, we recompute the candidates and call setInput() with the result;
* and here is the issue: it seems Win 7 (at least) does not like at all that we change the input while the combo is opened.  It looks like even though the user has not selected anything, calling setInput() calls back on the combo's selection listener, which starts an infinite loop of events.
Comment 5 Pierre-Charles David CLA 2018-01-26 02:41:55 EST
Moved to EEF, as the issue (and fix) are purely on this side.
Comment 6 Eclipse Genie CLA 2018-01-26 05:03:16 EST
New Gerrit change created: https://git.eclipse.org/r/116091
Comment 8 Pierre-Charles David CLA 2018-01-26 11:05:28 EST
Fixed by 78d12316b8f118cd30e68973dc5ae641430dea79.
Comment 9 Laurent Fasani CLA 2018-02-01 04:05:47 EST
Validated with Sirius5.1.1rc5
Comment 10 Eclipse Genie CLA 2018-02-02 11:24:51 EST
New Gerrit change created: https://git.eclipse.org/r/116622