Bug 217777 - [Workbench] Workbench event loop does not terminate if Display is closed
Summary: [Workbench] Workbench event loop does not terminate if Display is closed
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 M6   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard: hasPatch
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2008-02-04 18:50 EST by Francis Upton IV CLA
Modified: 2008-03-25 10:55 EDT (History)
1 user (show)

See Also:
bokowski: review+


Attachments
Patch for I20071213-1500 (724 bytes, patch)
2008-02-04 18:52 EST, Francis Upton IV CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Francis Upton IV CLA 2008-02-04 18:50:44 EST
In the dispose() method of my application, I incorrectly closed the current Display.  This caused the Workbench event loop to keep going forever, as it would keep getting an exception and then continue because the runEventLoop field was never turned off.

This is different from how 3.3.1 used to work.

Attached is a patch to fix the problem which has been tested to properly show the exception and terminate.
Comment 1 Francis Upton IV CLA 2008-02-04 18:52:55 EST
Created attachment 88846 [details]
Patch for I20071213-1500
Comment 2 Tod Creasey CLA 2008-02-06 16:42:04 EST
As this is right in the Workbench code I would like a second opinion. I am concerned that this is not enough as the Display can throw three potential issues

ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver
ERROR_DEVICE_DISPOSED - if the receiver has been disposed
ERROR_FAILED_EXEC 

Although I think the first and third should not stop us. I think the patch is OK in principle but I would like Boris' opinion.
Comment 3 Boris Bokowski CLA 2008-02-08 10:56:44 EST
Looks good.  Francis, I cc'ed you on a bug in the same area that I think is important for RCP apps.  (Just in case you are interested in contributing some more...) ;-)
Comment 4 Tod Creasey CLA 2008-02-12 08:40:15 EST
Patch Patch released for build >20080212
Comment 5 Tod Creasey CLA 2008-03-25 10:55:31 EDT
Verified in I20080325-0100