Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 115800 - [import/export] Stack overflow during import zip
Summary: [import/export] Stack overflow during import zip
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2   Edit
Hardware: PC All
: P3 critical (vote)
Target Milestone: 3.2 M4   Edit
Assignee: Karice McIntyre CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-10 07:03 EST by Tobias Widmer CLA
Modified: 2005-12-13 11:04 EST (History)
3 users (show)

See Also:


Attachments
Test zip (142.60 KB, application/x-zip-compressed)
2005-11-10 07:04 EST, Tobias Widmer CLA
no flags Details
apply patch to org.eclipse.ui.ide (2.06 KB, patch)
2005-11-10 13:03 EST, Karice McIntyre CLA
no flags Details | Diff
apply to org.eclipse.ui.tests (11.26 KB, patch)
2005-11-14 15:07 EST, Karice McIntyre CLA
no flags Details | Diff
add to data/org.eclipse.datatransferArchives directory (10.00 KB, application/octet-stream)
2005-11-14 15:09 EST, Karice McIntyre CLA
no flags Details
add to data/org.eclipse.datatransferArchives directory (786 bytes, application/x-zip-compressed)
2005-11-14 15:09 EST, Karice McIntyre CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Widmer CLA 2005-11-10 07:03:06 EST
I20051108-1011:

Steps to reproduce:
- Create new Java project called JUnit, default settings
- Import attached zip

-> After the file browsing dialog closes, stack overflows:

java.lang.StackOverflowError
	at org.eclipse.core.runtime.Path.<init>(Path.java:194)
	at org.eclipse.core.runtime.Path.removeLastSegments(Path.java:805)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)

...
...

	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.create
Container(ZipLeveledStructureProvider.java:76)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.initia
lize(ZipLeveledStructureProvider.java:201)
	at 
org.eclipse.ui.internal.wizards.datatransfer.ZipLeveledStructureProvider.getChi
ldren(ZipLeveledStructureProvider.java:108)
	at 
org.eclipse.ui.internal.wizards.datatransfer.MinimizedFileSystemElement.populat
e(MinimizedFileSystemElement.java:85)
	at 
org.eclipse.ui.internal.wizards.datatransfer.MinimizedFileSystemElement.getFile
s(MinimizedFileSystemElement.java:46)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1.createRootElement(WizardFileSystemResourceImportPage1.java:373)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1$9.run(WizardFileSystemResourceImportPage1.java:753)
	at org.eclipse.swt.custom.BusyIndicator.showWhile
(BusyIndicator.java:69)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1.selectFiles(WizardFileSystemResourceImportPage1.java:749)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardArchiveFileResourceImportPag
e1.getFileSystemTree(WizardArchiveFileResourceImportPage1.java:247)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1.resetSelection(WizardFileSystemResourceImportPage1.java:681)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardArchiveFileResourceImportPag
e1.resetSelection(WizardArchiveFileResourceImportPage1.java:433)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1.setSourceName(WizardFileSystemResourceImportPage1.java:796)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardArchiveFileResourceImportPag
e1.handleSourceBrowseButtonPressed
(WizardArchiveFileResourceImportPage1.java:358)
	at 
org.eclipse.ui.internal.wizards.datatransfer.WizardFileSystemResourceImportPage
1.handleEvent(WizardFileSystemResourceImportPage1.java:592)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:896)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3240)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2860)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:809)
	at org.eclipse.jface.window.Window.open(Window.java:787)
	at org.eclipse.ui.actions.ImportResourcesAction.run
(ImportResourcesAction.java:159)
	at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent
(BaseSelectionListenerAction.java:167)
	at 
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:530)
	at org.eclipse.jface.action.ActionContributionItem.access$2
(ActionContributionItem.java:480)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent
(ActionContributionItem.java:392)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:896)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3240)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2860)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1786)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1750)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
(Workbench.java:378)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run
(IDEApplication.java:106)
	at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:165)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:58)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)
Comment 1 Tobias Widmer CLA 2005-11-10 07:04:03 EST
Created attachment 29689 [details]
Test zip
Comment 2 Karice McIntyre CLA 2005-11-10 11:48:06 EST
I think this is a result of the patch for bug 96704 - we may have to roll this 
out.
Comment 3 Karice McIntyre CLA 2005-11-10 13:03:53 EST
Created attachment 29716 [details]
apply patch to org.eclipse.ui.ide

This patch fixes the SOE. I also checked that Import Existing projects from
workspace, archive option will import this project (after exporting it to an
archive) since that import wizard and the import from archive wizard both use
this same code.

I need to write tests to add to the suite for this, but I also need the patch
for the test for bug 96704 to be released first.
Comment 4 Karice McIntyre CLA 2005-11-10 13:05:28 EST
Doug, can you check this patch?
Comment 5 Douglas Pollock CLA 2005-11-11 12:10:50 EST
Fixed in CVS. 
Comment 6 Karice McIntyre CLA 2005-11-11 16:59:22 EST
Still need to add a test for this.  Marking M4 as target.
Comment 7 Karice McIntyre CLA 2005-11-11 17:00:14 EST
Oops, I didn't mean to mark this as resolved too!  At least not until I write 
the test.
Comment 8 Karice McIntyre CLA 2005-11-14 15:07:59 EST
Created attachment 29907 [details]
apply to org.eclipse.ui.tests

Patch to add 2 tests to Archive import where the archive has a file at the root
(no folder path to be created).
Comment 9 Karice McIntyre CLA 2005-11-14 15:09:14 EST
Created attachment 29908 [details]
add to data/org.eclipse.datatransferArchives directory

Tar test archive.
Comment 10 Karice McIntyre CLA 2005-11-14 15:09:33 EST
Created attachment 29909 [details]
add to data/org.eclipse.datatransferArchives directory

Zip test archive.
Comment 11 Karice McIntyre CLA 2005-11-15 17:16:17 EST
Doug, can you check the patch for the test?  See comments 8, 9, and 10.
Comment 12 Douglas Pollock CLA 2005-11-16 10:22:20 EST
Kim: Can you look at this patch? 
 
Comment 13 Kim Horne CLA 2005-11-16 11:15:02 EST
Tests applied.
Comment 14 Karice McIntyre CLA 2005-12-13 11:02:54 EST
Verified in I20051213-0010
Comment 15 Karice McIntyre CLA 2005-12-13 11:04:02 EST
Forgot to change status to verified.