Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 160745 - Dangerous use of getActiveShell in Debug
Summary: Dangerous use of getActiveShell in Debug
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.3 M4   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 153737
  Show dependency tree
 
Reported: 2006-10-12 16:26 EDT by Tod Creasey CLA
Modified: 2006-12-08 12:27 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tod Creasey CLA 2006-10-12 16:26:20 EDT
Version: 3.3.0
Build id: I20061010-0800

There are several places within debug where dialogs are open off of the active shell which could be most anything.

I describe the issues with doing this an the solution we use in the progress service in http://todcreaseyeclipse.blogspot.com/2006/10/safer-ways-to-parent-your-shells.html.

I suspect Bug153737 may be a result of this practise.

I saw this in the following places

org.eclipse.debug.ui.RefreshTab.selectResources()
org.eclipse.debug.internal.ui.stringsubstitution.PromptingResolver.getShell()
org.eclipse.debug.internal.ui.views.memory.renderings.PrintTableRenderingAction.run()
Comment 1 Tod Creasey CLA 2006-10-12 16:26:44 EDT
Keeping the reference to Bug 153737
Comment 2 Michael Rennie CLA 2006-12-07 16:46:55 EST
fixed in HEAD

changed the aforementioned classes to ensure safer shells are used, and modified DebugUIPlugin and JDIDebugUIPlugin to use the safe shell code (thanks Tod) in their respective getShell() methods
Comment 3 Michael Rennie CLA 2006-12-07 16:48:32 EST
please verify Darin W
Comment 4 Darin Wright CLA 2006-12-08 12:27:33 EST
Verified.