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

Bug 337913

Summary: [Import/Export] Unable to close Import Project dialog after successful import
Product: [Eclipse Project] Platform Reporter: DJ Houghton <dj.houghton>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact: Oleg Besedin <ob1.eclipse>
Severity: normal    
Priority: P3 CC: daniel_megert, egalvez, johan.wannheden, markus.kell.r, ob1.eclipse, prakash, pwebster, remy.suen, sellis, serano, throwaway
Version: 3.7   
Target Milestone: 4.2 M6   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
log file
none
log file 2 none

Description DJ Houghton CLA 2011-02-22 17:16:07 EST
Build: I20110222-0800

- download and extract zip attachment from Bug 334016
- File -> Import -> Existing Projects into workspace
- select location 
- select all 3 projects and hit Finish

For me: 
- dialog didn't go away
- I couldn't hit Cancel (or the X on the dialog)
- if I tried to hit Finish again, it said the projects already existed in the workspace
- indeed the projects are in the workspace so the first "finish" must have worked

The only way I could get out of this state was to kill the process.
Comment 1 DJ Houghton CLA 2011-02-22 17:17:05 EST
Should also have noted that I selected the option to copy the project contents into the workspace.
Comment 2 Prakash Rangaraj CLA 2011-02-22 22:24:56 EST
I'm unable to reproduce it. The attachment from the bug you mentioned (https://bugs.eclipse.org/bugs/attachment.cgi?id=186541) has only 2 projects not 3 as you say. Are we looking at the same attachment?
Comment 3 Dani Megert CLA 2011-02-23 04:11:47 EST
I could not reproduce either (tried both ZIPs).
Anything in the .log?
Comment 4 DJ Houghton CLA 2011-02-23 07:41:29 EST
Created attachment 189592 [details]
log file

Sorry, I got distracted working on something else and forgot to attach the log. There is an NPE in a wizard dialog.

As for the attachment, I am looking at the second one on bug 334016. (attachment 189318 [details])
Comment 5 Dani Megert CLA 2011-02-23 08:31:07 EST
Interesting location for the NPE.
Comment 6 DJ Houghton CLA 2011-10-07 10:29:02 EDT
This happened for me again today. Same NPE in the WizardDialog.stopped method. Easy steps this time with no extras installed. 

- On Mac OS X Snow Leopard
- Build 3.8.0.N20111005-2000
- Download and extract attachment from Bug 359683
- File -> Import -> Existing Projects into Workspace
- select all 4 projects
- choose Copy to workspace
- hit Finish

Note: projects appear in workspace but dialog won't go away. Trying to close the dialog via the X in the corner tells me it can't because it is in the middle of an operation. I have to end up killing the Eclipse process via the command-line in order to continue.

Remy: if this interests you and you want to remote debug, etc let me know.
Comment 7 Remy Suen CLA 2011-10-17 08:04:51 EDT
*** Bug 361120 has been marked as a duplicate of this bug. ***
Comment 8 Remy Suen CLA 2011-10-17 08:05:14 EDT
Bug 361120 comment 0 has an analysis of the problem.
Comment 9 Paul Webster CLA 2011-10-27 07:13:40 EDT
Prakash, do you have any time to look at this?

PW
Comment 10 Dani Megert CLA 2011-10-27 10:29:25 EDT
Really seems to be a Mac specific issue. Can't reproduce on Windows 7.
Comment 11 DJ Houghton CLA 2011-12-20 08:22:18 EST
Created attachment 208611 [details]
log file 2

This is still an issue. 

I've reproduced the problem by following the exact steps from comment 6 on this week's i-build.
   Version: 4.2.0
   Build id: I20111216-1500

I've attached a copy of the log file.
Comment 12 Markus Keller CLA 2012-01-28 15:51:30 EST
Bug 361120 comment 0 is spot on:
- you have to be on a Mac to reproduce this
- you have to *click the Browse button* (pasting a path won't reproduce)
- you have to click the "Copy..." button once and then click Finish

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

The bug is that WizardDialog#run(..) is not reentrant-safe if the second invocation happens already in aboutToStart(..).

Fixed with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=R3_development&id=10e060bb38b198e1c3bdded20955783f80e0d668
and
http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?h=master&id=1a7bd0f8b299473e3febaa6c2ad37de14669fc6a


BTW: To get out of this state, you can go back to the new wizard selection page, and then use the File System wizard and import any file.
Comment 13 Serano Colameo CLA 2012-03-31 06:36:01 EDT
Will be there a fix for 3.7.2 as well?

I'm observing since years this silly bug and it nerves really!

Serano
Comment 14 Dani Megert CLA 2012-04-02 04:04:00 EDT
(In reply to comment #13)
> Will be there a fix for 3.7.2 as well?

3.7.2 is already released and there won't be further 3.7.x builds. Either switch to 3.8 M6 or 4.2 M6.
Comment 15 Eddie Galvez CLA 2012-08-31 16:16:08 EDT
It appears on osx (at least 10.8) that from the dock you can select Quit and it looked like it triggered a proper shutdown; better than a force-quit.
Comment 16 Scott Ellis CLA 2013-03-22 16:47:50 EDT
We have a product based on 3.7.2 and cannot upgrade to 3.8 at this time. Can you please provide a patch we can apply to fix this bug in 3.7.2?
Thanks,
Scott
Comment 17 Scott Ellis CLA 2013-03-22 17:12:57 EDT
D'oh I'm sorry I missed the links to the file diffs for the fix in comment 12, sorry about that.
-Scott