Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323808 - org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: Widget is disposed) Failed to execute runnable (org.eclipse.e4.core.di.InjectionException: org.eclipse.swt.SWTException: Wid
Summary: org.eclipse.swt.SWTException: Failed to execute runnable (org.eclipse.e4.core...
Status: RESOLVED WORKSFORME
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Server 2003
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 331440
  Show dependency tree
 
Reported: 2010-08-27 07:24 EDT by aviral CLA
Modified: 2010-12-14 07:29 EST (History)
2 users (show)

See Also:


Attachments
Error log (93.61 KB, application/x-zip)
2010-11-16 10:00 EST, Martin Oberhuber CLA
no flags Details
Log after quit + restart (98.19 KB, application/x-zip)
2010-11-16 10:24 EST, Martin Oberhuber CLA
no flags Details
Thread dump after quit+restart again (25.20 KB, application/octet-stream)
2010-11-16 10:25 EST, Martin Oberhuber CLA
no flags Details
Screenshot of the original message (26.24 KB, image/gif)
2010-11-16 10:36 EST, Martin Oberhuber CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description aviral CLA 2010-08-27 07:24:56 EDT
Build Identifier:  I20100727-1520

Steps:Open Properties view on a newly created e4 application.
Pin the properties view .
Right Click and say open a new properties view.
On the UI i got the Widget is disposed error.

Also the build is behaving abruptly with pallete view coming half white half grey etc.

Reproducible: Always

Steps to Reproduce:
1.Open Properties view on a newly created e4 application.
2.Pin the properties view .
3.Right Click and say open a new properties view.
Comment 1 Remy Suen CLA 2010-08-27 15:38:13 EDT
Please try to reproduce the problem with a recent build.
http://download.eclipse.org/e4/sdk/drops/I20100826-2051/index.php

If the bug still occurs, please provide the full stack trace.
Comment 2 Martin Oberhuber CLA 2010-11-16 09:17:26 EST
Build ID:  I20101029-1118

I think I've seen the same issue with Eclipse SDK 4.1M3:
- Installed RSE from Helios site
- Opened Remote Systems Perspective
- Click the "New Connection" icon very quickly after opening the perspective

An error dialog is shown with a message that looks like a stack overflow. Nothing is logged into the Errorlog view, therefore I cannot provide a stacktrace.

Accepting the error dialog and trying again, this time the RSE New Connection Wizard is properly shown. 

The issue is not reproducable on restart.
Comment 3 Martin Oberhuber CLA 2010-11-16 10:00:18 EST
Created attachment 183227 [details]
Error log

Seen this again, this time when right-clicking in RSE.

Attached is my .log -- 94K ZIP will expand to 18MB log. Interestingly the backtrace is in the log, even though it's not in the errorlog view.
Comment 4 Martin Oberhuber CLA 2010-11-16 10:24:44 EST
Created attachment 183231 [details]
Log after quit + restart

This time, RSE gets completely unusable. Even quit + restart won't work - Eclipse fails to start (see attached log).
Comment 5 Martin Oberhuber CLA 2010-11-16 10:25:15 EST
Created attachment 183232 [details]
Thread dump after quit+restart again

Quitting and restarting again, Eclipse hangs. See attached thread dump.
Comment 6 Martin Oberhuber CLA 2010-11-16 10:36:25 EST
Marking as critical since my workspace got really busted this time. Whenever Eclipse tries to launch into the Remote Systems perspective, it locks up with attached Thread Dump. Launching with 
   -perspective org.eclipse.ui.resourcePerspective
doesn't help. 

I finally recovered by deleting
   .metadata\.plugins\org.eclipse.ui.ide\dialogSettings.xml
   .metadata\.plugins\org.eclipse.e4.workbench\deltas.xml
which brought me back into a healthy Java perspective.
Comment 7 Martin Oberhuber CLA 2010-11-16 10:36:56 EST
Created attachment 183233 [details]
Screenshot of the original message

For completeness, here is a screenshot of the original error message.
Comment 8 Remy Suen CLA 2010-11-16 11:24:37 EST
(In reply to comment #5)
> Created an attachment (id=183232) [details]
> Thread dump after quit+restart again

Looks like some recursion caused by the changes for bug 325834.
Comment 9 Remy Suen CLA 2010-11-16 12:48:56 EST
(In reply to comment #5)
> Created an attachment (id=183232) [details]
> Thread dump after quit+restart again

Martin, I don't understand the code in SystemViewPart. Do you know why it's granting focus to the shell? The shell is getting focus and then the part tries to get focus and then the shell tries to get focus and then...well, you get the idea.

If I remove lines 542-543 the problem no longer occurs. Do you agree with this fix, Martin?
Comment 11 Martin Oberhuber CLA 2010-11-16 13:00:48 EST
Yes, the RSE SystemView carries a long heritage :)

Thanks for looking at this, Remy. I have filed bug 330386 for investigating your suggestion on the TM/RSE side. DaveM might know best whether your approach is valid, and what the original code was good for.

One point is, of course, that this has never bee a problem with Eclipse 3.x (and apparently also not with Eclipse 2.x). Of course that's not a proof of correctness. Still e4 shouldn't barf even on invalid client code, should it? Thus keeping the issue open on the e4 side for now.
Comment 12 Eric Moffatt CLA 2010-11-16 13:46:56 EST
First, thanks for trying this out on 4.1 ! It's to find these special cases that we need this kind of input...

Remy already has a proposed patch that prevents recursions of this type but I'd still recommend fixing the SVP's setFocus logic, it's clearly goes against the javadoc.

I'd really like to log the blocked recursion as an ERROR because it really is an unexpected event. If we do so then the SVP will spam the log with something like:

"Blocked recursive call to 'setFocus', is your part granting focus to a control the part didn't create?"
Comment 13 Martin Oberhuber CLA 2010-11-16 14:20:19 EST
I like the idea of logging, but can you keep the tone more technical? E.g.

"Blocked recursive call to 'setFocus' in org.eclipse.rse.ui.SystemViewPart"
   Other involved parts: foo, bar, ...

I seem to have seen other examples of "blocked recursive..." errors in the Eclipse error log before, but cannot remember at the moment which they were.

And yes, running on 4.1M3 is fun and I'm going to blog this experience which has mostly been positive so far... thanks for all your great work!
Comment 14 Remy Suen CLA 2010-11-16 14:25:39 EST
(In reply to comment #13)
> I seem to have seen other examples of "blocked recursive..." errors in the
> Eclipse error log before, but cannot remember at the moment which they were.

This error message pops up in 3.x occasionally. You might've seen it there.
Comment 15 Remy Suen CLA 2010-11-16 14:31:44 EST
Bug 330389 has been opened to prevent the recursion.
Comment 16 Eric Moffatt CLA 2010-11-16 16:17:58 EST
Thanks Martin. Once you get the blog written ping me and I'll add it to the list of references to use when I'm trying to get the rest of Indigo to test their components :-). This makes a good case because it was through this testing that we found an 'edge condition' that left the workbench in a (badly) corrupted state. For the most part most 'normal' patterns work, it's this type of specificity that fleshes us out to handle special cases.

As far as the message goes the feedback from 3.x is that many of our messages are not very helpful (they amount to 'You scr*wed up, fix it'..;-). Perhaps I was just a bit too chummy in tone but I still think that augmenting log messages with a 'Known causes' section would be useful in many cases (where they can be determined).
Comment 17 Martin Oberhuber CLA 2010-12-14 04:11:38 EST
(In reply to comment #15)
With bug 330389 fixed, I assume that this one can be closed as well or even marked as a duplicate?
Comment 18 Remy Suen CLA 2010-12-14 07:29:37 EST
(In reply to comment #17)
> (In reply to comment #15)
> With bug 330389 fixed, I assume that this one can be closed as well or even
> marked as a duplicate?

Actually, I feel that the bug you encountered is not actually related to the one that original reporter reported. However, since I cannot reproduce the original problem, I am going to close this bug.

aviral, if you still see the problem you reported in comment 0 on 4.1M4, please feel free to reopen the bug.
http://download.eclipse.org/e4/sdk/