Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331795 - Error reporting/handling should be protected from runtime exceptions to prevent workbench shutdown
Summary: Error reporting/handling should be protected from runtime exceptions to preve...
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: All All
: P3 blocker (vote)
Target Milestone: 4.1 M4   Edit
Assignee: Remy Suen CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 13:15 EST by Remy Suen CLA
Modified: 2010-12-06 08:20 EST (History)
0 users

See Also:


Attachments
PartRenderingEngine patch v1 (1.23 KB, patch)
2010-12-03 13:18 EST, Remy Suen CLA
no flags Details | Diff
Patch that also safes up setting focus as well as widget disposal (3.49 KB, patch)
2010-12-03 15:25 EST, Eric Moffatt 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-03 13:15:38 EST
At the moment, we ask the StatusReporter to notify the user of exceptions or the logger to log them when the rendering engine is up.

However, if an exception occurs during said action (notification/logging), then the entire event loop is killed. We need to protect the code block in order to prevent problematic code from bringing down the workbench (see bug 331784).
Comment 1 Remy Suen CLA 2010-12-03 13:18:54 EST
Created attachment 184493 [details]
PartRenderingEngine patch v1

Eric, please take a look.
Comment 2 Remy Suen CLA 2010-12-03 14:04:59 EST
Patch released to CVS HEAD.
Comment 3 Eric Moffatt CLA 2010-12-03 15:25:38 EST
Created attachment 184507 [details]
Patch that also safes up setting focus as well as widget disposal


We have to trap exceptions that occur on the widget disposal in SWTPartRenderer#disposeWidget. Without this we don't proceed with the 'uninject' of the contribution or the disposal of its context.

While not as serious this also traps and reports and error if an attempt to set the focus to a CompatibilityPart throws an exception.
Comment 4 Remy Suen CLA 2010-12-06 08:20:16 EST
I added a test to PartRenderingEngineTests to check that a bad DisposeListener won't prevent the @PreDestroy from being called.