Community
Participate
Working Groups
Build 20020924 I had an editor (org.eclipse.ui.externaltools.model.ExternalTool.java) open with my cursor in a call to ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE); I pressed F3 to go to the definition of validateName and the following appeared in the console: Unhandled exception caught in event loop. Reason: -1 This error message isn't very useful but the following was printed to my .log file: !SESSION Oct 01, 2002 11:48:14.56 ---------------------------------------------- java.version=1.4.1-beta java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=motif, NL=en_US Command-line arguments: -os linux -ws motif -arch x86 -debug -dev bin -data /home/jburns/target -install file:/home/jburns/host/eclipse/ !ENTRY org.eclipse.ui 4 4 Oct 01, 2002 11:48:14.58 !MESSAGE Unhandled exception caught in event loop. !ENTRY org.eclipse.ui 4 0 Oct 01, 2002 11:48:14.81 !MESSAGE -1 !STACK 0 java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jdt.internal.core.SourceMapper.exitMethod(SourceMapper.java:507) at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceElementRequestor(SourceElementParser.java:775) at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceElementRequestor(SourceElementParser.java:969) at org.eclipse.jdt.internal.compiler.SourceElementParser.notifySourceElementRequestor(SourceElementParser.java:600) at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:1042) at org.eclipse.jdt.internal.core.SourceMapper.mapSource(SourceMapper.java:800) at org.eclipse.jdt.internal.core.SourceMapper.mapSource(SourceMapper.java:745) at org.eclipse.jdt.internal.core.ClassFile.openBuffer(ClassFile.java:405) at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:192) at org.eclipse.jdt.internal.core.ClassFile.getSourceRange(ClassFile.java:289) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.probeInputForSource(ClassFileEditor.java:577) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:507) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:1502) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:556) at org.eclipse.ui.internal.EditorManager.openInternalEditor(EditorManager.java:607) at org.eclipse.ui.internal.EditorManager.openEditorFromDescriptor(EditorManager.java:421) at org.eclipse.ui.internal.EditorManager.openEditor(EditorManager.java:393) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1736) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:1679) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:137) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:107) at org.eclipse.jdt.internal.ui.actions.OpenActionUtil.open(OpenActionUtil.java:52) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:164) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:141) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:749) at org.eclipse.ui.internal.registry.AcceleratorScope$AcceleratorAction.run(AcceleratorScope.java:289) at org.eclipse.ui.internal.registry.AcceleratorScope.processKey(AcceleratorScope.java:249) at org.eclipse.ui.internal.KeyBindingMenu$3.handleEvent(KeyBindingMenu.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1697) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1520) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1256) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1239) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
I cannot reproduce. The exception occured in this code: /** * @see ISourceElementRequestor */ public void exitMethod(int declarationEnd) { if (typeDepth >= 0) { IType currentType = this.types[typeDepth]; SourceRange sourceRange = new SourceRange( fMemberDeclarationStart[typeDepth], declarationEnd - fMemberDeclarationStart [typeDepth] + 1); IMethod method = currentType.getMethod( fMemberName[typeDepth], convertTypeNamesToSigs (fMethodParameterTypes[typeDepth])); setSourceRange( method, sourceRange, fMemberNameRange[typeDepth]); // ON THIS LINE setMethodParameterNames( method, fMethodParameterNames[typeDepth]); } } I don't see how this is possible, because you can get into this block only if typeDepth >= 0. That could be a JIT problem. Can you reproduce it all the time? If yes, could you please try without the JIT. If you can still reproduce it, please provide your workspace and exact steps to reproduce.
Jared - which JDK version are you using ? 1.4.1-b14 has a lot of strange VM bugs.
I was using JDK 1.4.1-b14. This only happened once. I haven't been able to reproduce it.
Then close for now. Reopen with exact steps to reproduce if you get it again.