| Summary: | [LTTng] Experiment instability | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Francois Chouinard <fchouinard> | ||||
| Component: | LinuxTools | Assignee: | Bernd Hufmann <bernd.hufmann> | ||||
| Status: | CLOSED FIXED | QA Contact: | Francois Chouinard <fchouinard> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | bernd.hufmann | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Francois Chouinard
I'm looking into it Created attachment 182508 [details]
update vertical scrollbar in CFV asynchronously to get correct display
The described incorrect display of the CFV when selecting an experiment the second time was caused by an incorrect vertical scrollbar. Everytime the CFV receives new data it will be updated by executing a refresh on a TableViewer as well as the refresh of the TimeAnalysisViewer. The Scrollbar of the parent scroll composite is based on the size of the table in the table viewer. For that the following line is executed:
scrollFrame.setMinSize(tableViewer.getTable().computeSize(SWT.DEFAULT, SWT.DEFAULT));
When selecting an experiment the second time, for some reason the method computeSize() returns a lower value for the height, even if the table contains exact the same data than when calling it the first time (i.e. the same number of items and the same item contents). The method computeSize() will call OS specific primitives to get the size (width, height). It looks like there is an racing condition between the refresh of the table and when computing the size.
To make sure that the refresh of the table is finished and to avoid the racing condition, the computation of the size (table.computeSize()) and the setting of the minimum size of the scroll composite (scrollFrame.setMinSize()) have to be done asynchronously using asyncExec() on a display. This will re-schedule these tasks in the GUI thread and the execution will be done shortly after.
The attached patch contains this fix.
Comment on attachment 182508 [details]
update vertical scrollbar in CFV asynchronously to get correct display
Nice find. Thanks Bernd.
Fix committed to Indigo. Delivered with 0.7 |