Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332644 - [EditorMgmt] DefaultPartList leaks shells
Summary: [EditorMgmt] DefaultPartList leaks shells
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Remy Suen CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on: 335566
Blocks:
  Show dependency tree
 
Reported: 2010-12-15 10:33 EST by Remy Suen CLA
Modified: 2019-11-08 04:40 EST (History)
1 user (show)

See Also:


Attachments
DefaultPartList patch v1 (1.35 KB, patch)
2010-12-15 10:35 EST, 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 Remy Suen CLA 2010-12-15 10:33:23 EST
Every time you hit Ctrl+E with editors opened and you hide the shell by granting focus to another control, we are leaking a shell. The shells will only get disposed when you actually close the workbench window itself.
Comment 1 Remy Suen CLA 2010-12-15 10:35:36 EST
Created attachment 185231 [details]
DefaultPartList patch v1

Dispose the shell instead of making it when it gets deactivated.
Comment 2 Remy Suen CLA 2010-12-15 12:03:45 EST
(In reply to comment #1)
> Created an attachment (id=185231) [details]
> DefaultPartList patch v1

Fix released to CVS HEAD.
Comment 3 Remy Suen CLA 2011-01-25 08:14:52 EST
Verified by source inspection with I20110124-1800.
Comment 4 Remy Suen CLA 2011-01-25 10:59:14 EST
1. Open an editor.
2. Ctrl+E
3. Alt+Tab to another window.
4. Alt+Tab back to Eclipse.
5. Ctrl+E does nothing.

It may be that the disposal is causing issues with the source providers. I'll rollback this change tomorrow.
Comment 5 Remy Suen CLA 2011-01-26 08:06:21 EST
(In reply to comment #1)
> Created attachment 185231 [details]
> DefaultPartList patch v1

Change rolled back due to comment 4. Will look at this again later.
Comment 6 Dani Megert CLA 2011-01-27 07:06:42 EST
(In reply to comment #4)
> 1. Open an editor.
> 2. Ctrl+E
> 3. Alt+Tab to another window.
> 4. Alt+Tab back to Eclipse.
> 5. Ctrl+E does nothing.
> 
> It may be that the disposal is causing issues with the source providers.
This is not related to source providers. The problem is that the focus is not returned to styled text (no caret) though Caret.setFocus() is called. This looks like an SWT issue to me. A possible ugly workaround would be to do the dispose in an asyncExec.
Comment 7 Remy Suen CLA 2011-01-27 07:26:37 EST
(In reply to comment #6)
> The problem is that the focus is not
> returned to styled text (no caret) though Caret.setFocus() is called. This
> looks like an SWT issue to me.

Thanks for investigating, Dani! This is quite interesting. Perhaps I can draw up a snippet that will reproduce the problem.

> A possible ugly workaround would be to do the
> dispose in an asyncExec.

Indeed. I tried this while I was verifying that comment 4 was caused by this change and the asyncExec workaround does work.
Comment 8 Remy Suen CLA 2011-01-27 08:06:41 EST
(In reply to comment #6)
> The problem is that the focus is not
> returned to styled text (no caret) though Caret.setFocus() is called.

I have opened bug 335566 for this problem.
Comment 9 Dani Megert CLA 2011-01-27 08:11:01 EST

*** This bug has been marked as a duplicate of bug 335566 ***
Comment 10 Remy Suen CLA 2011-01-27 08:15:36 EST
(In reply to comment #9)
> *** This bug has been marked as a duplicate of bug 335566 ***

Actually Dani, I would like to keep this bug open.

If SWT fixes the problem, I still need to deliver attachment 185231 [details] back to HEAD so that the shell is actually disposed.
Comment 11 Dani Megert CLA 2011-01-27 08:17:58 EST
(In reply to comment #10)
> (In reply to comment #9)
> > *** This bug has been marked as a duplicate of bug 335566 ***
> 
> Actually Dani, I would like to keep this bug open.
Yes, of course: me too. I wanted to mark it as depends on, but obviously was to fast/lazy.
Comment 12 Remy Suen CLA 2011-01-28 08:00:05 EST
Verified that comment 4 is no logger bugged with I20110127-2034 on Windows XP.
Comment 13 Remy Suen CLA 2011-03-31 09:34:55 EDT
Not clear if SWT will fix bug 335566 for 3.7. Unsetting the target milestone.
Comment 14 Lars Vogel CLA 2019-11-08 04:40:05 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

If the bug is still relevant please remove the stalebug whiteboard tag.