Bug 75784 - java.lang.ArrayIndexOutOfBoundsException in compilation
Summary: java.lang.ArrayIndexOutOfBoundsException in compilation
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0.2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 76918 80450 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-07 08:22 EDT by Genady Beryozkin CLA
Modified: 2005-03-10 04:57 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Genady Beryozkin CLA 2004-10-07 08:22:15 EDT
java.lang.ArrayIndexOutOfBoundsException: 15
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildFields
(ClassScope.java:126)
at org.eclipse.jdt.internal.compiler.lookup.ClassScope.buildFieldsAndMethods
(ClassScope.java:136)
at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.buildFieldsAndMet
hods(CompilationUnitScope.java:61)
at 
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings
(LookupEnvironment.java:182)
at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:552)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process
(CompilationUnitProblemFinder.java:176)
at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure
(CompilationUnit.java:146)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:183)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed
(JavaElement.java:572)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
(JavaElement.java:309)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo
(JavaElement.java:295)
at org.eclipse.jdt.internal.core.JavaElement.getChildren(JavaElement.java:250)
at org.eclipse.jdt.internal.core.JavaElement.getChildrenOfType
(JavaElement.java:264)
at org.eclipse.jdt.internal.core.CompilationUnit.getTypes
(CompilationUnit.java:822)
at 
org.eclipse.jdt.internal.corext.refactoring.rename.RenameCompilationUnitProcess
or.getTypeWithTheSameName(RenameCompilationUnitProcessor.java:290)
at 
org.eclipse.jdt.internal.corext.refactoring.rename.RenameCompilationUnitProcess
or.computeRenameTypeRefactoring(RenameCompilationUnitProcessor.java:279)
at 
org.eclipse.jdt.internal.corext.refactoring.rename.RenameCompilationUnitProcess
or.<init>(RenameCompilationUnitProcessor.java:62)
at org.eclipse.jdt.ui.refactoring.RenameSupport.create(RenameSupport.java:250)
at 
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.createG
eneric(RenameJavaElementAction.java:187)
at 
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.canEnab
le(RenameJavaElementAction.java:78)
at 
org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.selecti
onChanged(RenameJavaElementAction.java:62)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchSelectionChanged
(SelectionDispatchAction.java:200)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.selectionChanged
(SelectionDispatchAction.java:195)
at org.eclipse.jdt.ui.actions.RenameAction.selectionChanged
(RenameAction.java:82)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159)
at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157)
at org.eclipse.jface.viewers.StructuredViewer.updateSelection
(StructuredViewer.java:1394)
at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect
(StructuredViewer.java:617)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected
(StructuredViewer.java:721)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent
(OpenStrategy.java:189)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:186)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:236)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:254)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run
(PlatformActivator.java:335)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:704)
at org.eclipse.core.launcher.Main.main(Main.java:688)
Comment 1 Jerome Lanneluc CLA 2004-10-07 11:09:54 EDT
Please provide build number and steps to reproduce the problem.
Comment 2 Genady Beryozkin CLA 2004-10-07 12:09:52 EDT
Eclipse 3.0.1

It is really hard to provide a reproducible test case. Many factors could have 
caused it.
I have a project with a linked source folder where many required source files 
are missing. The linked source files themselves (that do exist) are located on 
a "webdrive" network drive (that connects to a SFTP server).

The reason I need all this stuff is because I edit the files on Windows and 
compile them on a remote linux machine (not enough bandwidth to run remote X).

Please tell me if this is enough info or you need more details.
Comment 3 Kent Johnson CLA 2004-10-12 11:35:18 EDT
Needed both duplicate fields and an inconsistent hierarchy:

public class X extends Y {
	int i;
	int i;
}

Fixed, will appear in 3.0.2.
Comment 4 Genady Beryozkin CLA 2004-10-18 15:36:20 EDT
Is it possible to release a patch that solves this bug?

I don't see 3.0.2 builds yet, and eclipse hangs when this problem occurs
(I killed it, and got a 50MB log file of this exception).

Thanks,
Genady
Comment 5 Kent Johnson CLA 2004-10-18 17:22:25 EDT
How often do you have a busted hierarchy and duplicate fields?
Comment 6 Genady Beryozkin CLA 2004-10-18 17:50:59 EDT
I'm working on a project with Jikes RVM.
Jikes RVM does not have directory structure that follows java packages 
conventions (this screws up the hierarchy), so I import the files and fix the 
problems myself.

Due to the bug, I can't open the files in the Java editor, and have to use a 
text editor.
Comment 7 Kent Johnson CLA 2004-10-25 10:32:42 EDT
*** Bug 76918 has been marked as a duplicate of this bug. ***
Comment 8 Kent Johnson CLA 2004-12-13 11:33:28 EST
*** Bug 80450 has been marked as a duplicate of this bug. ***
Comment 9 Philipe Mulet CLA 2005-01-26 16:09:51 EST
Candidating for 3.0.2 release (not committed yet)
Comment 10 David Audel CLA 2005-03-10 04:57:08 EST
Verified with M20050216