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

Bug 367518

Summary: Sometimes tree nodes are not expanded after asynchronous update ("updating...")
Product: [Tools] MAT Reporter: Kevin Grigorenko <kevin.grigorenko>
Component: GUIAssignee: Andrew Johnson <andrew_johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Proposed fix andrew_johnson: iplog+

Description Kevin Grigorenko CLA 2011-12-23 14:21:41 EST
I can't tell if this is a timing condition or what, but sometimes when expanding a tree node, the "updating..." child will show up, but when it finishes, the parent node collapses and you have to expand the parent again to get the children. I can reproduce this consistently when re-opening a large dump, then doing "Show objects by class," and picking something common such as java.lang.String, and then expanding the first row.
Comment 1 Kevin Grigorenko CLA 2011-12-23 14:23:22 EST
Created attachment 208786 [details]
Proposed fix

I'm not sure if this is the right solution, but it does fix the problem for me and doesn't seem to cause any side effects.

What seems to happen is that after disposing/removing all child items, the parent gets its "expanded" flag reset (presumably since there are no children, it can't be expanded). So I just save that off and reset it after the real children are added.
Comment 2 Andrew Johnson CLA 2012-01-12 05:43:14 EST
I've found this hard to reproduce on Windows 7, even with a delay. It might have happened once. The fix seems sensible however, so I'll apply it.
Comment 3 Andrew Johnson CLA 2012-01-23 10:29:01 EST
Fix applied.
Comment 4 Kevin Grigorenko CLA 2012-01-23 14:37:31 EST
(In reply to comment #3)
> Fix applied.

Thanks.