Community
Participate
Working Groups
When searching for variable declarations in the workspace, in some cases an internal error occurs. The following is shown in the error properties: Session Data: java.version=1.4.2 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE Command-line arguments: -os win32 -ws win32 -arch x86 -install file:E:/Programme/eclipse/ Status Details: java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283) at org.eclipse.jface.dialogs.ProgressMonitorDialog.run (ProgressMonitorDialog.java:357) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:292) at org.eclipse.jdt.ui.actions.FindReferencesAction.run (FindReferencesAction.java:83) at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:238) 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: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:2022) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1729) 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:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.core.SourceMapper.findSourceFileName (SourceMapper.java:840) at org.eclipse.jdt.internal.core.search.matching.PotentialMatch.getSourceFileName (PotentialMatch.java:88) at org.eclipse.jdt.internal.core.search.matching.PotentialMatch.getQualifiedName (PotentialMatch.java:125) at org.eclipse.jdt.internal.core.search.matching.PotentialMatch.<init> (PotentialMatch.java:46) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.addPotentialMatch (MatchLocator2.java:201) at org.eclipse.jdt.internal.core.search.matching.MatchLocator2.locateMatches (MatchLocator2.java:869) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:471) at org.eclipse.jdt.core.search.SearchEngine.search (SearchEngine.java:400) at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute (JavaSearchOperation.java:90) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run (WorkspaceModifyOperation.java:71) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1595) at org.eclipse.ui.actions.WorkspaceModifyOperation.run (WorkspaceModifyOperation.java:85) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)
>in some cases Is there a pattern or is it random?
Offending line shouldn't fail. if (type.isMember()) { IType enclosingType = type.getDeclaringType(); 840> while (enclosingType.getDeclaringType() != null) { enclosingType = enclosingType.getDeclaringType(); } except on illformed binaries (wrong attributes fooling our decoding support). Klaus - could you provide us with a testcase ?
I will investigate as soon as I get a test case.
Null check has been added. We would like to understand how this happened. Could you please provide a test case and reopen the PR. Thanks.
Verified in 200402121200.