Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 530447

Summary: org.eclipse.jdt.ui.TemplateProposalComputer plug in exception when trying to use auto complete
Product: [Eclipse Project] JDT Reporter: ilan dardik <ilansysdardik>
Component: UIAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: critical    
Priority: P3 CC: jarthana, stephan.herrmann
Version: 4.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard: stalebug
Attachments:
Description Flags
The location in the code where the exception occurs none

Description ilan dardik CLA 2018-01-29 06:39:07 EST
Created attachment 272447 [details]
The location in the code where the exception occurs

Hey, my autocomplete throws an exception every time i try to use it in 
the marked area in the picture.
basically it happens inside a rxjava publish-subject subscription method,
anytime im trying to add another method to the stream inside, it throws this exception 


REPORT

comment             
eclipseBuildId      4.7.2.M20171130-0510
eclipseProduct      org.eclipse.epp.package.java.product
javaRuntimeVersion  1.8.0_151-b12
osgiWs              win32
osgiOs              Windows10
osgiOsVersion       10.0.0
osgiArch            x86_64
severity            UNKNOWN


STATUS

pluginId            org.eclipse.recommenders.completion.rcp
pluginVersion       2.5.0.v20171201-1623
code                2
severity            4
message             Exception during code completion.
fingerprint         ea0f58b4cb717b8f1a902ec2f6700075

Exception:java.lang.NullPointerException: null
	 at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2865)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:938)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:759)
	 at org.eclipse.jdt.internal.codeassist.complete.CompletionOnMemberAccess.resolveType(CompletionOnMemberAccess.java:56)
	 at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1026)
	 at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:117)
	 at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:434)
	 at org.eclipse.jdt.internal.compiler.ast.FunctionalExpression.resolveType(FunctionalExpression.java:174)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:714)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:662)
	 at org.eclipse.jdt.internal.codeassist.complete.CompletionOnMemberAccess.resolveType(CompletionOnMemberAccess.java:56)
	 at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1026)
	 at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:117)
	 at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:434)
	 at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolvePolyExpressionArguments(ASTNode.java:694)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:945)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:759)
	 at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1026)
	 at org.eclipse.jdt.internal.compiler.ast.Block.resolve(Block.java:117)
	 at org.eclipse.jdt.internal.compiler.ast.LambdaExpression.resolveType(LambdaExpression.java:434)
	 at org.eclipse.jdt.internal.compiler.ast.ASTNode.resolvePolyExpressionArguments(ASTNode.java:694)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:945)
	 at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:759)
	 at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:1026)
	 at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:634)
	 at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:307)
	 at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:544)
	 at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1195)
	 at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1308)
	 at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:625)
	 at org.eclipse.jdt.internal.codeassist.CompletionEngine.complete(CompletionEngine.java:2232)
	 at org.eclipse.jdt.internal.core.Openable.codeComplete(Openable.java:131)
	 at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:358)
	 at org.eclipse.jdt.internal.core.CompilationUnit.codeComplete(CompilationUnit.java:346)
	 at org.eclipse.recommenders.completion.rcp.CompletionContextFunctions$InternalCompletionContextFunction.compute(CompletionContextFunctions.java:407)
	 at org.eclipse.recommenders.completion.rcp.RecommendersCompletionContext.get(RecommendersCompletionContext.java:325)
	 at org.eclipse.recommenders.completion.rcp.RecommendersCompletionContext.get(RecommendersCompletionContext.java:333)
	 at org.eclipse.recommenders.completion.rcp.RecommendersCompletionContext.doGetCoreContext(RecommendersCompletionContext.java:132)
	 at org.eclipse.recommenders.completion.rcp.RecommendersCompletionContext.getCompletionNode(RecommendersCompletionContext.java:115)
	 at org.eclipse.recommenders.internal.constructors.rcp.ConstructorCompletionSessionProcessor.isCompletionRequestSupported(ConstructorCompletionSessionProcessor.java:216)
	 at org.eclipse.recommenders.internal.constructors.rcp.ConstructorCompletionSessionProcessor.startSession(ConstructorCompletionSessionProcessor.java:87)
	 at org.eclipse.recommenders.completion.rcp.processable.IntelligentCompletionProposalComputer.fireStartSession(IntelligentCompletionProposalComputer.java:305)
	 at org.eclipse.recommenders.completion.rcp.processable.IntelligentCompletionProposalComputer.computeCompletionProposals(IntelligentCompletionProposalComputer.java:171)
	 at org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(CompletionProposalComputerDescriptor.java:333)
	 at org.eclipse.jdt.internal.ui.text.java.CompletionProposalCategory.computeCompletionProposals(CompletionProposalCategory.java:337)
	 at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.collectProposals(ContentAssistProcessor.java:331)
	 at org.eclipse.jdt.internal.ui.text.java.ContentAssistProcessor.computeCompletionProposals(ContentAssistProcessor.java:288)
	 at org.eclipse.jface.text.contentassist.ContentAssistant$3.run(ContentAssistant.java:2007)
	 at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	 at org.eclipse.jface.text.contentassist.ContentAssistant.computeCompletionProposals(ContentAssistant.java:2004)
	 at org.eclipse.jface.text.contentassist.CompletionProposalPopup.computeProposals(CompletionProposalPopup.java:560)
	 at org.eclipse.jface.text.contentassist.CompletionProposalPopup.access$7(CompletionProposalPopup.java:555)
	 at org.eclipse.jface.text.contentassist.CompletionProposalPopup$2.run(CompletionProposalPopup.java:489)
	 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	 at org.eclipse.jface.text.contentassist.CompletionProposalPopup.showProposals(CompletionProposalPopup.java:482)
	 at org.eclipse.jface.text.contentassist.ContentAssistant.showPossibleCompletions(ContentAssistant.java:1823)
	 at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor$AdaptedSourceViewer.doOperation(CompilationUnitEditor.java:184)
	 at org.eclipse.ui.texteditor.ContentAssistAction$1.run(ContentAssistAction.java:84)
	 at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	 at org.eclipse.ui.texteditor.ContentAssistAction.run(ContentAssistAction.java:81)
	 at org.eclipse.jface.action.Action.runWithEvent(Action.java:473)
	 at org.eclipse.jface.commands.ActionHandler.execute(ActionHandler.java:118)
	 at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
	 at sun.reflect.NativeMethodAccessorImpl.invoke0(null:-2)
	 at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)
	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)
	 at java.lang.reflect.Method.invoke(null:-1)
	 at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	 at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
	 at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
	 at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	 at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	 at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	 at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	 at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:287)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:527)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:577)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:385)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.access$0(KeyBindingDispatcher.java:331)
	 at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:88)
	 at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	 at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1271)
	 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1078)
	 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1103)
	 at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1088)
	 at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1130)
	 at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1126)
	 at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1547)
	 at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4962)
	 at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:364)
	 at org.eclipse.swt.widgets.Control.windowProc(Control.java:4843)
	 at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:359)
	 at org.eclipse.swt.widgets.Display.windowProc(Display.java:5178)
	 at org.eclipse.swt.internal.win32.OS.CallWindowProcW(OS.java:-2)
	 at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2454)
	 at org.eclipse.swt.internal.BidiUtil.windowProc(BidiUtil.java:701)
	 at org.eclipse.swt.internal.win32.OS.DispatchMessageW(OS.java:-2)
	 at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2560)
	 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3815)
	 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	 at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	 at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	 at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	 at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	 at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	 at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	 at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	 at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	 at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	 at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	 at sun.reflect.NativeMethodAccessorImpl.invoke0(null:-2)
	 at sun.reflect.NativeMethodAccessorImpl.invoke(null:-1)
	 at sun.reflect.DelegatingMethodAccessorImpl.invoke(null:-1)
	 at java.lang.reflect.Method.invoke(null:-1)
	 at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	 at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	 at org.eclipse.equinox.launcher.Main.run(Main.java:1499)


BUNDLES

name                org.eclipse.core.commands
version             3.9.0.v20170530-1048

name                org.eclipse.core.databinding.observable
version             1.6.100.v20170515-1119

name                org.eclipse.core.databinding
version             1.6.100.v20170515-1119

name                org.eclipse.core.runtime
version             3.13.0.v20170207-1030

name                org.eclipse.e4.core.commands
version             0.12.100.v20170513-0428

name                org.eclipse.e4.core.contexts
version             1.6.0.v20170322-1144

name                org.eclipse.e4.core.di
version             1.6.100.v20170421-1418

name                org.eclipse.e4.ui.bindings
version             0.12.1.v20170823-1632

name                org.eclipse.e4.ui.workbench
version             1.5.1.v20170815-1446

name                org.eclipse.e4.ui.workbench.swt
version             0.14.101.v20170710-1119

name                org.eclipse.equinox.app
version             1.3.400.v20150715-1528

name                org.eclipse.equinox.launcher
version             1.4.0.v20161219-1356

name                org.eclipse.jdt
version             3.13.2.v20171130-0510

name                org.eclipse.jdt.core
version             3.13.100.v20171123-1049

name                org.eclipse.jdt.ui
version             3.13.51.v20171122-0652

name                org.eclipse.jface
version             3.13.2.v20171022-1656

name                org.eclipse.jface.text
version             3.12.1.v20171114-1359

name                org.eclipse.recommenders.completion.rcp
version             2.5.0.v20171201-1623

name                org.eclipse.recommenders.constructors.rcp
version             2.5.0.v20171201-1623

name                org.eclipse.recommenders.constructors
version             2.5.0.v20171201-1623

name                org.eclipse.swt
version             3.106.2.v20171129-0543

name                org.eclipse.ui
version             3.109.0.v20170411-1742

name                org.eclipse.ui.ide.application
version             1.2.0.v20170512-1452

name                org.eclipse.ui.ide
version             3.13.1.v20170822-1526
Comment 1 Stephan Herrmann CLA 2018-01-29 17:33:05 EST
Would you be in the position to share the source code so we can reproduce the problem?
Comment 2 Jay Arthanareeswaran CLA 2018-01-30 07:46:09 EST
Most likely to be a problem with core, but we don't know for sure until we are able to reproduce.

The best way forward is to get our hands on the source code, as Stephan said. If that's not possible, see if you can isolate this issue in a smaller piece of code.
Comment 3 ilan dardik CLA 2018-01-31 09:00:33 EST
Hey guys thanks for the quick comments, i will not be able to share the code, but ill will try to reproduce it in a separate project/example and share it,
Thanks again.
Comment 4 Stephan Herrmann CLA 2018-02-15 07:49:51 EST
(In reply to ilan dardik from comment #3)
> Hey guys thanks for the quick comments, i will not be able to share the
> code, but ill will try to reproduce it in a separate project/example and
> share it,
> Thanks again.

Any success so far?
Comment 5 Eclipse Genie CLA 2020-02-26 13:07:50 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.