Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320813 - Minimized stacks are missing on restart
Summary: Minimized stacks are missing on restart
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: 1.0 RC3   Edit
Assignee: Remy Suen CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
: 317506 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-07-24 11:42 EDT by Eric Moffatt CLA
Modified: 2010-07-27 13:54 EDT (History)
2 users (show)

See Also:


Attachments
Here's a deltas file that gives me no trim stacks... (107.87 KB, text/xml)
2010-07-24 11:47 EDT, Eric Moffatt CLA
no flags Details
The deltas file from a 'failing' version produced by my original steps\ (110.15 KB, text/xml)
2010-07-26 09:54 EDT, Eric Moffatt CLA
no flags Details
XMLModelReconciler patch v1 (772 bytes, patch)
2010-07-26 10:16 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Moffatt CLA 2010-07-24 11:42:07 EDT
Run a fresh inner (no deltas)
Detach the Outline view by dragging it right
maximize the editor area

close
restart

There are no minimized stacks visible

If yoiu put a breakpoint in the WBWRenderer's processContents where it's restoring the trimBars before the restart you can see that there is only the one 'top' trim bar in the model, not sure where they went...I'll attach my deltas file, to my untrained eye the minimized stacks seem to be there (i.e. if you do a find on 'left(' there is a ToolControl defined).
Comment 1 Eric Moffatt CLA 2010-07-24 11:47:45 EDT
Created attachment 175156 [details]
Here's a deltas file that gives me no trim stacks...


The bug seems somewhat sporatic, I've had the test scenario work but fails often enough...

If you are in this state then unmax-ing the editor area will throw NPEs. Reset perspective seems to get you back to sanity.
Comment 2 Boris Bokowski CLA 2010-07-24 16:40:10 EDT
Here are steps:

1. Start with a fresh workspace
2. Detach the Package Explorer
3. Minimize the Package Explorer -> goes to the trim
4. Restart -> No minimized stack for the Package Explorer anymore
Comment 3 Eric Moffatt CLA 2010-07-24 18:02:43 EDT
*** Bug 317506 has been marked as a duplicate of this bug. ***
Comment 4 Eric Moffatt CLA 2010-07-26 09:54:38 EDT
Created attachment 175219 [details]
The deltas file from a 'failing' version produced by my original steps\
Comment 5 Remy Suen CLA 2010-07-26 10:03:07 EDT
(In reply to comment #4)
> Created an attachment (id=175219) [details]
> The deltas file from a 'failing' version produced by my original steps\

From the file, we can see that it is merely recording a direct reference to some other EMF object instead of preserving the object in its entirety...

<trimBars>
  <reference elementId="_vvVoUJi5Ed-hoIBGGUL7JQ"/>
  <reference elementId="_vveyQJi5Ed-hoIBGGUL7JQ"/>
</trimBars>

...like so...

<trimBars>
  <reference e4namespace="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" type="org.eclipse.e4.ui.model.application.ui.basic.MTrimBar" unset="true" xmiId="_i0vdUJi9Ed-4eNTZLPBU-w">
  <!-- ... -->
  </reference>
</trimBars>
Comment 6 Remy Suen CLA 2010-07-26 10:16:40 EDT
Created attachment 175221 [details]
XMLModelReconciler patch v1

The reconciler was asking trimmed windows whether their trim bars changed. If a workbench window was asked, then 'true' would be returned and the deltas would be persisted properly. If 'false' was returned, we would get the problem described in comment 5 where only an id reference was made.

The reason this bug was "somewhat" reproducible is because the iteration over the trimmed windows is undefined (as it is merely a map). So sometimes you'd get the workbench window first and get 'true' and sometimes you'd get the detached window first and get 'false'.
Comment 7 Eric Moffatt CLA 2010-07-26 10:23:27 EDT
+1 from me...I haven't had any recurrences running with the patched code...
Comment 8 Boris Bokowski CLA 2010-07-26 10:34:24 EDT
+1
Comment 9 Remy Suen CLA 2010-07-26 10:39:05 EDT
Fix released to CVS HEAD. Thanks for finding this bug, Eric.
Comment 10 Eric Moffatt CLA 2010-07-27 13:54:40 EDT
Verified on XP in I20100726-2152 (Using many of my old scenarios that would show this).