Bug 44119 - NPE while searching for references to Action#run()
Summary: NPE while searching for references to Action#run()
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 M4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 39112 43764 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-10-03 05:31 EDT by Markus Keller CLA
Modified: 2003-10-14 13:05 EDT (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 Markus Keller CLA 2003-10-03 05:31:43 EDT
I20030930
Steps:
- new Workspace
- import org.eclipse.jdt.ui (+all required) as binary projects with linked content
- open org.eclipse.jface.action.Action and select method run()
- search for references in workspace

Error Oct 03, 2003 11:18:10.49 Internal Error
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:361)
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:196)
at
org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:172)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:203)
at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:212)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:543)
at
org.eclipse.jface.action.ActionContributionItem.access$4(ActionContributionItem.java:496)
at
org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:468)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2173)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2106)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:2089)
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(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:298)
at org.eclipse.core.launcher.Main.run(Main.java:764)
at org.eclipse.core.launcher.Main.main(Main.java:598)
Caused by: java.lang.NullPointerException
at
org.eclipse.jdt.internal.ui.search.JavaSearchResultCollector.accept(JavaSearchResultCollector.java:121)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.report(MatchLocator.java:921)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.report(MatchLocator.java:914)
at
org.eclipse.jdt.internal.core.search.matching.MethodLocator.matchReportReference(MethodLocator.java:131)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1122)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1297)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator$LocalDeclarationVisitor.visit(MatchLocator.java:94)
at
org.eclipse.jdt.internal.compiler.ast.AnonymousLocalTypeDeclaration.traverse(AnonymousLocalTypeDeclaration.java:139)
at
org.eclipse.jdt.internal.compiler.ast.QualifiedAllocationExpression.traverse(QualifiedAllocationExpression.java:380)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.traverse(MessageSend.java:305)
at org.eclipse.jdt.internal.compiler.ast.Block.traverse(Block.java:127)
at org.eclipse.jdt.internal.compiler.ast.IfStatement.traverse(IfStatement.java:254)
at
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.traverse(ConstructorDeclaration.java:439)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1103)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1297)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1308)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching(MatchLocator.java:1183)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:855)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:588)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:625)
at
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:712)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:568)
at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:495)
at
org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute(JavaSearchOperation.java:96)
at
org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:71)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1555)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1572)
at
org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
Comment 1 Philipe Mulet CLA 2003-10-03 10:07:28 EDT
I got a similar intriguing NPE as well...
!ENTRY org.eclipse.jdt.ui 4 10001 Oct 03, 2003 16:02:02.933
!MESSAGE Internal Error
!STACK 0
java.lang.reflect.InvocationTargetException
        at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:283)
        at org.eclipse.jface.dialogs.ProgressMonitorDialog.run
(ProgressMonitorDialog.java:361)
        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.WorkingSetFindAction.run
(WorkingSetFindAction.java:66)
        at org.eclipse.jdt.ui.actions.FindAction.run(FindAction.java:220)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun
(SelectionDispatchAction.java:194)
        at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run
(SelectionDispatchAction.java:172)
        at org.eclipse.jface.action.Action.runWithEvent(Action.java:842)
        at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection
(ActionContributionItem.java:543)
        at org.eclipse.jface.action.ActionContributionItem.access$4
(ActionContributionItem.java:496)
        at org.eclipse.jface.action.ActionContributionItem$6.handleEvent
(ActionContributionItem.java:468)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:847)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2173)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1863)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2106)
        at org.eclipse.ui.internal.Workbench.run(Workbench.java:2089)
        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
(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:298)
        at org.eclipse.core.launcher.Main.run(Main.java:764)
        at org.eclipse.core.launcher.Main.main(Main.java:598)
Caused by: java.lang.NullPointerException
        at org.eclipse.jdt.internal.core.search.JavaSearchScope.fullPath
(JavaSearchScope.java:243)
        at org.eclipse.jdt.internal.core.search.JavaSearchScope.encloses
(JavaSearchScope.java:229)
        at org.eclipse.jdt.internal.core.search.matching.MatchLocator.report
(MatchLocator.java:903)
        at 
org.eclipse.jdt.internal.core.search.matching.PatternLocator.matchReportReferenc
e(PatternLocator.java:195)
        at 
org.eclipse.jdt.internal.core.search.matching.TypeReferenceLocator.matchReportRe
ference(TypeReferenceLocator.java:178)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching
(MatchLocator.java:1122)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching
(MatchLocator.java:1297)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching
(MatchLocator.java:1308)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.reportMatching
(MatchLocator.java:1183)
        at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process
(MatchLocator.java:855)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:588)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:625)
        at 
org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches
(MatchLocator.java:734)
        at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:568)
        at org.eclipse.jdt.core.search.SearchEngine.search
(SearchEngine.java:495)
        at org.eclipse.jdt.internal.ui.search.JavaSearchOperation.execute
(JavaSearchOperation.java:96)
        at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run
(WorkspaceModifyOperation.java:71)
        at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1555)
        at org.eclipse.core.internal.resources.Workspace.run
(Workspace.java:1572)
        at org.eclipse.ui.actions.WorkspaceModifyOperation.run
(WorkspaceModifyOperation.java:85)
        at org.eclipse.jface.operation.ModalContext$ModalContextThread.run
(ModalContext.java:101)
Comment 2 Kent Johnson CLA 2003-10-03 10:32:36 EDT
*** Bug 43764 has been marked as a duplicate of this bug. ***
Comment 3 Kent Johnson CLA 2003-10-03 15:46:17 EDT
The problem is caused by constructors in .class files that have an extra 
synthetic argument. We fail trying to create an IJavaElement for it.

I'll add protection for this case.
Comment 4 Kent Johnson CLA 2003-10-06 17:18:58 EDT
Now handle constructors with synthetic args.
Comment 5 Philipe Mulet CLA 2003-10-07 07:33:49 EDT
Fix looks suspicious. It should add synthetic arguments to build proper handle.
Comment 6 Kent Johnson CLA 2003-10-07 13:30:14 EDT
Changed to add extra arg to non-static constructors in binary member types.
Comment 7 David Audel CLA 2003-10-14 09:17:46 EDT
Verified.
Comment 8 Kent Johnson CLA 2003-10-14 13:05:39 EDT
*** Bug 39112 has been marked as a duplicate of this bug. ***