Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361120 - Import wizard hangs when 'Copy projects into Workspace' is selected
Summary: Import wizard hangs when 'Copy projects into Workspace' is selected
Status: CLOSED DUPLICATE of bug 337913
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 4.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-17 06:54 EDT by Mattias Bybro CLA
Modified: 2011-10-17 08:04 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mattias Bybro CLA 2011-10-17 06:54:06 EDT
Build Identifier: 20110615-0604 (Indigo)

This problem only happens on Mac OS X. (My version is Mac OS X Lion 10.7)

Here's what happens:
* A NPE occurs at org.eclipse.jface.wizard.WizardDialog.stopped(WizardDialog.java:1316)
* The waitCursor field is null at this point, which causes the import wizard to 'hang' (it does not actually hang, you can wriggle your way out of the hanged state - but the user will experience this as a hang and may want to force-close Eclipse)

Why does it happen?
* On OS X, A FocusLost event is issued upon pressing "Finish", but not when clicking the "Copy projects into Workspace" checkbox. This will cause a second invocation of WizardDialog.run before the first one is completed. This in its turn leaks a cursor resource (waitCursor) and the second invocation will try to dispose a waitCursor that has already been nulled out.

Why does it happen for this version but not for version 3.6?
I suspect this the removal of this line in WizardProjectsImportPage.java (due to bug 334236) to be the culprit, since it will trigger an project list update (which calls WizardDialog.run)
(Was Line 429:) updateProjectsList(directoryPathField.getText().trim());

Reproducible: Always

Steps to Reproduce:
1. Select "File > Import... > General > Existing Projects into Workspace"
2. Click "Browse..." and select a directory containing one or more Eclipse projects
3. Click "Copy projects into Workspace" (Note: do not click any other UI elements)
4. Click "Finish"
Comment 1 Remy Suen CLA 2011-10-17 08:04:51 EDT

*** This bug has been marked as a duplicate of bug 337913 ***