Bug 36213 - ArrayIndex out of bounds
Summary: ArrayIndex out of bounds
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1.1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-08 10:16 EDT by Nikolay Metchev CLA
Modified: 2003-06-10 10:24 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 Nikolay Metchev CLA 2003-04-08 10:16:11 EDT
I am not sure how eclipse got into this state but it started throwing the 
following exceptions:

org.eclipse.core.internal.resources.ResourceException: Errors during build.
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:216)
	at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java:884)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1600)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2711)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run
(WorkbenchRunnableAdapter.java:42)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:302)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish
(NewElementWizard.java:96)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:608)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:321)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:89)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.internal.NewWizardShortcutAction.run
(NewWizardShortcutAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:397)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	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:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
!ENTRY org.eclipse.core.resources 2 75 Apr 08, 2003 15:06:22.765
!MESSAGE Errors during build.
!SUBENTRY 1 org.eclipse.jdt.core 2 75 Apr 08, 2003 15:06:22.765
!MESSAGE 1
!STACK 0
java.lang.ArrayIndexOutOfBoundsException: 1
	at 
org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.findSourceFiles
(IncrementalImageBuilder.java:309)
	at org.eclipse.jdt.internal.core.builder.IncrementalImageBuilder.build
(IncrementalImageBuilder.java:74)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.buildDeltas
(JavaBuilder.java:205)
	at org.eclipse.jdt.internal.core.builder.JavaBuilder.build
(JavaBuilder.java:133)
	at org.eclipse.core.internal.events.BuildManager$2.run
(BuildManager.java:427)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:125)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:181)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:191)
	at org.eclipse.core.internal.events.BuildManager$1.run
(BuildManager.java:151)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:889)
	at org.eclipse.core.runtime.Platform.run(Platform.java:413)
	at org.eclipse.core.internal.events.BuildManager.basicBuild
(BuildManager.java:165)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop
(BuildManager.java:243)
	at org.eclipse.core.internal.events.BuildManager.build
(BuildManager.java:212)
	at org.eclipse.core.internal.resources.Workspace.endOperation
(Workspace.java:884)
	at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1600)
	at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:2711)
	at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run
(WorkbenchRunnableAdapter.java:42)
	at org.eclipse.jface.operation.ModalContext.runInCurrentThread
(ModalContext.java:302)
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252)
	at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:758)
	at org.eclipse.jdt.internal.ui.wizards.NewElementWizard.performFinish
(NewElementWizard.java:96)
	at org.eclipse.jface.wizard.WizardDialog.finishPressed
(WizardDialog.java:608)
	at org.eclipse.jface.wizard.WizardDialog.buttonPressed
(WizardDialog.java:321)
	at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423)
	at org.eclipse.swt.widgets.TypedListener.handleEvent
(TypedListener.java:89)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:583)
	at org.eclipse.jface.window.Window.open(Window.java:563)
	at org.eclipse.ui.internal.NewWizardShortcutAction.run
(NewWizardShortcutAction.java:96)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:456)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetEvent
(ActionContributionItem.java:403)
	at org.eclipse.jface.action.ActionContributionItem.access$0
(ActionContributionItem.java:397)
	at 
org.eclipse.jface.action.ActionContributionItem$ActionListener.handleEvent
(ActionContributionItem.java:72)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1838)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1545)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402)
	at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
	at org.eclipse.core.internal.boot.InternalBootLoader.run
(InternalBootLoader.java:845)
	at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461)
	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:324)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:291)
	at org.eclipse.core.launcher.Main.run(Main.java:747)
	at org.eclipse.core.launcher.Main.main(Main.java:583)
Comment 1 Olivier Thomann CLA 2003-04-08 10:18:58 EDT
Would you have steps to reproduce?
Comment 2 Nikolay Metchev CLA 2003-04-08 10:25:36 EDT
I tried restarting Eclipse and the problem has not gone away. I guess it must 
be to do with my workspace! Should I attatch it? it pretty big!
Comment 3 Olivier Thomann CLA 2003-04-08 10:39:19 EDT
If it is too big, don't attach it. Do you have a way to put it on a server and 
we can download it. Having a reproducable test case helps us a lot to fix a 
problem.
Comment 4 Kent Johnson CLA 2003-04-09 10:55:56 EDT
Which VM + version are you using?

Is there anything else in your metadata\.log file?
Comment 5 Nikolay Metchev CLA 2003-04-09 13:25:12 EDT
JDK 1.4.1_02 and Eclipse 2.1. Nothing else in the .log file.
I tried to attatch the project that is causing the problem but its just over 
the limit allowed by bugzilla!
Comment 6 Kent Johnson CLA 2003-04-09 13:50:29 EDT
This problem occurs when the project is also a source folder but not the first 
one listed.

Nikolay: Can you paste the .classpath file of your project into this PR please.

Philippe: We should backport this fix to the 2.1.x stream.
Comment 7 Nikolay Metchev CLA 2003-04-09 13:59:18 EDT
the .classpath of the project

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="source"/>
    <classpathentry excluding="source/" kind="src" path=""/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/xmlsec.jar"/>
    <classpathentry kind="lib"
        path="C:/Program Files/Apache Group/Tomcat 4.1/webapps/axis/WEB-
INF/lib/axis.jar" sourcepath="C:/Documents and Settings/Nikolay/Desktop/axis-
1_1rc2-src/axis-1_1RC2/src/src.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/axis-ant.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/commons-discovery.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/commons-logging.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/jaxrpc.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/log4j-1.2.4.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/mail.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/saaj.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/wsdl4j.jar"/>
    <classpathentry kind="lib" path="C:/Program Files/Apache Group/Tomcat 
4.1/webapps/axis/WEB-INF/lib/activation.jar"/>
    <classpathentry kind="lib" path="C:/j2sdk1.4.1_02/jre/lib/jce.jar"/>
    <classpathentry kind="lib" 
path="G:/BuildEnv/SDK/Redist/Java/JUnit/v3.8.1/junit.jar"/>
    <classpathentry kind="output" path="bin"/>
</classpath>
Comment 8 Kent Johnson CLA 2003-04-09 14:11:19 EDT
Do you actually have source files located in the project's root (other than in 
the folder source)? If not just remove the entry:

    <classpathentry excluding="source/" kind="src" path=""/>

Otherwise make it the first entry in the .classpath file ahead of:

    <classpathentry kind="src" path="source"/>
Comment 9 Philipe Mulet CLA 2003-04-10 05:34:47 EDT
Agreed for backporting. Please do so.
Ideally, we should have a testcase for it, which would also be backported.
Comment 10 Philipe Mulet CLA 2003-04-10 07:48:35 EDT
Backported. Please double check.
Comment 11 Jerome Lanneluc CLA 2003-04-15 10:46:12 EDT
Fixed in 2.2 stream as well.
Comment 12 David Audel CLA 2003-06-02 09:38:22 EDT
Verified.
Comment 13 David Audel CLA 2003-06-10 10:24:17 EDT
Verified for 3.0M1.