Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 361120

Summary: Import wizard hangs when 'Copy projects into Workspace' is selected
Product: [Eclipse Project] Platform Reporter: Mattias Bybro <throwaway>
Component: IDEAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: remy.suen
Version: 4.2   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

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 ***