Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 274358

Summary: Show Thread Group option not propery updated in debug view
Product: [Eclipse Project] Platform Reporter: Samantha Chan <chanskw>
Component: DebugAssignee: Samantha Chan <chanskw>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, pawel.1.piech
Version: 3.5   
Target Milestone: 3.5 M7   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Screen cap showing the thread group while the option is off
none
screen cap showing inconsistent content between the breadcrumb and the dropdown
none
Screenshot of messed up thread groups in DV.
none
patch none

Description Samantha Chan CLA 2009-04-29 14:02:19 EDT
Testcase TestManyThreads

1.  Debug view in breadcrumb mode
2.  Show Thread Group turned on
3.  Stop in main and launch

Once launched, turn off the thread group option.  

Thread groups are still displayed in the breadcrumb.
Thread groups continue to be displayed in the breadcrumb even after stepping, which in theory should cause the view to update.
Comment 1 Darin Wright CLA 2009-04-29 15:35:13 EDT
Pawel, do you have time to investigate this one during RC1?
Comment 2 Pawel Piech CLA 2009-04-29 15:45:44 EDT
I'm still trying to understand the problem completely.  When I try to reproduce the problem I do see that if I have the drop-down open and at the same time I open the view menu and change the threads groups setting, then the drop-down doesn't react immediately.  However, if I close and re-open the drop-down then the threads groups setting is observed.  

If this is the case, then I do think it's a real issue, but the severity should be minor IMO, and it could be pushed off past 3.5.  OTOH, the fix could be as simple as chaining the property listener from one presentation context to another.  I'd have to investigate to be sure.  I can try to investigate this in RC1, but I can't be sure if I'll have time for it.
Comment 3 Samantha Chan CLA 2009-04-29 17:11:22 EDT
Hi Pawel,

Just to clarify... This defect is not related to the breadcrumb drop down.  If you look at the content of the breadcrumb, you will see that the thread group elements are still there ever after the thread group option is turned off.  I will attach screen cap.

Thanks...
Sam
Comment 4 Samantha Chan CLA 2009-04-29 17:23:15 EDT
Created attachment 133843 [details]
Screen cap showing the thread group while the option is off
Comment 5 Samantha Chan CLA 2009-04-29 17:24:16 EDT
Created attachment 133845 [details]
screen cap showing inconsistent content between the breadcrumb and the dropdown

Notice that the breadcrumb has thread groups listed... while the dropdown doesn't any thread group.
Comment 6 Pawel Piech CLA 2009-04-29 17:31:53 EDT
Created attachment 133846 [details]
Screenshot of messed up thread groups in DV.

I see now.  I'm able to reproduce it as well.  However, I can also reproduce it in the tree view itself.  If I have thread groups on, and I have a stack frame selected, then switching thread-groups off seems to have an ill effect on the Debug view.  

I'll look into it still, though it's likely a problem with the TreeModelViewer rather than the breadcrumb.
Comment 7 Samantha Chan CLA 2009-04-29 17:44:00 EDT
I see it too... and I also don't think it's breadcrumb.
Looks like things are not being removed properly.  I see duplicated stackframe entries when in non-breadcrumb mode.  I see two of the same suspended threads, one in the non-existent thread group, one outside of the thread groups.

I also see empty labels in the debug view when switching thread group on and off a few times.
Comment 8 Darin Wright CLA 2009-04-30 11:39:54 EDT
Created attachment 133953 [details]
patch

This was caused by an optimization I made while fixing the collapsing thread problem (bug 212798). The assumption was that items in the tree have been allocated with null/empty elements for children, which are then retrieved/filtered and removed. However, when the structure of the tree changes, the elements may not be null, and still need to be removed.
Comment 9 Darin Wright CLA 2009-04-30 12:55:19 EDT
Released patch to HEAD. Please verify, Sam.
Comment 10 Darin Wright CLA 2009-04-30 16:09:43 EDT
(Fixed).
Comment 11 Samantha Chan CLA 2009-05-04 10:59:36 EDT
Verified.