Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 329473 - [LTTng] Experiment instability
Summary: [LTTng] Experiment instability
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: LinuxTools (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Bernd Hufmann CLA
QA Contact: Francois Chouinard CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 14:04 EDT by Francois Chouinard CLA
Modified: 2022-01-13 14:53 EST (History)
1 user (show)

See Also:


Attachments
update vertical scrollbar in CFV asynchronously to get correct display (1.10 KB, patch)
2010-11-05 14:04 EDT, Bernd Hufmann CLA
fchouinard: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Chouinard CLA 2010-11-04 14:04:27 EDT
When selecting an experiment for a nth time (n > 1), the ControlFlow view results are not consistent.

The problem was introduced following the commit of Oct/27 PM.
Comment 1 Bernd Hufmann CLA 2010-11-04 14:40:06 EDT
I'm looking into it
Comment 2 Bernd Hufmann CLA 2010-11-05 14:04:42 EDT
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 3 Francois Chouinard CLA 2010-11-05 14:25:14 EDT
Comment on attachment 182508 [details]
update vertical scrollbar in CFV asynchronously to get correct display

Nice find. Thanks Bernd.
Comment 4 Francois Chouinard CLA 2010-11-05 14:25:38 EDT
Fix committed to Indigo.
Comment 5 Francois Chouinard CLA 2011-07-22 14:52:00 EDT
Delivered with 0.7