Bug 407673 - [visualizer] canvas filter on thread: sometimes wrongly hides thread
Summary: [visualizer] canvas filter on thread: sometimes wrongly hides thread
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: Next   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.2   Edit
Assignee: Marc Dumais CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-09 13:16 EDT by Marc Dumais CLA
Modified: 2013-05-31 14:00 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Dumais CLA 2013-05-09 13:16:55 EDT
When the user switches between multiple sessions, a canvas filter containing threads might not always display correctly.  Sometimes a thread that is part of the filter will not be shown on the canvas.
Comment 1 Marc Dumais CLA 2013-05-09 13:37:04 EDT
What is happening is that we save references to model objects in the filter.  

When filtering a display, for threads, we also must allow their core and CPU to be displayed.  To know which core a thread is on, we look at the thread object saved in the filter.  

If for any reason the model has been re-created (for instance the user switched to another debug session and back), the filter will have a reference to the old model's thread object, which will not be updated if the thread changes core.  

The result will be that the filter will draw the core the thread used to run on, which might not be the one it's on now.   

I have a quick fix for this: when checking if a filtered object still is in the model, replace any old thread objects by their newer version in the filter list.   This problem would also disappear if the visualizer model was not re-created; see Bug 407640.
Comment 2 Marc Dumais CLA 2013-05-09 13:40:04 EDT
Patch for this :

https://git.eclipse.org/r/#/c/12688/



w/r to the patch submitted in this bug, I declare the following:

1) that I am authorized to submit this code change
2) that the code is 100% my own work

Marc Dumais
Comment 3 Marc Dumais CLA 2013-05-09 13:51:54 EDT
Hi again,

That patch has an issue.   I will work on this some more and submit a new patch.

Regards,

Marc
Comment 4 Marc Dumais CLA 2013-05-09 15:03:49 EDT
Hi,

A different approach with this new patch : 

https://git.eclipse.org/r/#/c/12692/

Thanks,

Marc
Comment 5 Marc Khouzam CLA 2013-05-31 14:00:14 EDT
Because RC3 will be built Monday, I reviewed this fix myself to make sure it would make it on time.

It looks good to me and will commit from Gerrit.
If there are other comments that come in, we'll address them right away.