Bug 548651 - NPE while compiling
Summary: NPE while compiling
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.12   Edit
Hardware: PC Mac OS X
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2019-06-25 17:57 EDT by Pablo Nussembaum CLA
Modified: 2023-08-02 13:15 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 Pablo Nussembaum CLA 2019-06-25 17:57:37 EDT
I get an NPE while compiling a really big java project, find the exception pasted below. 
Please let me know if you need more information.

-----------------------------------

session data:
eclipse.buildId=4.12.0.I20190605-1800
java.version=11.0.3
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_AR
Framework arguments:  -product org.eclipse.epp.package.jee.product -showLocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -showLocation -data /Users/pnussembaum/workspaces/workspace4

This is a continuation of log file /Users/pnussembaum/workspaces/workspace4/.metadata/.bak_0.log
Created Time: 2019-06-25 18:32:48.314

-------------------------------


java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.lookup.Scope.filterValidTypes(Scope.java:473)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.greaterLowerBound(Scope.java:394)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.leastContainingTypeArgument(Scope.java:3913)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.leastContainingInvocation(Scope.java:3871)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.lowerUpperBound(Scope.java:4014)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.lowerUpperBound(Scope.java:3971)
	at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.resolve(InferenceContext18.java:1150)
	at org.eclipse.jdt.internal.compiler.lookup.InferenceContext18.solve(InferenceContext18.java:1024)
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod18(ParameterizedGenericMethodBinding.java:249)
	at org.eclipse.jdt.internal.compiler.lookup.ParameterizedGenericMethodBinding.computeCompatibleMethod(ParameterizedGenericMethodBinding.java:92)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Scope.java:837)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(Scope.java:794)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod0(Scope.java:1750)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.findMethod(Scope.java:1651)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.getMethod(Scope.java:2934)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.findMethodBinding(MessageSend.java:953)
	at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:774)
	at org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:326)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:641)
	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:316)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:551)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1280)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1405)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:652)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1249)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:714)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1216)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:831)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider$1.run(CoreASTProvider.java:271)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.createAST(CoreASTProvider.java:263)
	at org.eclipse.jdt.core.manipulation.CoreASTProvider.getAST(CoreASTProvider.java:196)
	at org.eclipse.jdt.core.manipulation.SharedASTProviderCore.getAST(SharedASTProviderCore.java:139)
	at org.eclipse.jdt.internal.ui.text.java.hover.NLSStringHover.internalGetHoverInfo(NLSStringHover.java:139)
	at org.eclipse.jdt.internal.ui.text.java.hover.NLSStringHover.getHoverInfo2(NLSStringHover.java:118)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:167)
	at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:133)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:89)
	at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:169)
Comment 1 Stephan Herrmann CLA 2019-06-25 18:09:17 EDT
(In reply to Pablo Nussembaum from comment #0)
> I get an NPE while compiling a really big java project, find the exception
> pasted below. 
> Please let me know if you need more information.

Thanks. Yes, we'll need a source example that triggers this exception.

Could it be that some needed type cannot be found, and in particular that this type is used in "? extends Missing" or "? super Missing" ?
Comment 2 Stephan Herrmann CLA 2019-06-25 18:13:02 EDT
BTW, the stack trace you showed is not compilation proper, but happens while computing a hover. So the "bad" file must be the one you were looking at in the editor.
Comment 3 Pablo Nussembaum CLA 2019-06-26 10:48:32 EDT
I closed all open files then rebuilded the project and now I get an NPE on org.eclipse.core.resources without any stacktrace. 
Is there anything that I can do get more debug information?


eclipse.buildId=4.12.0.I20190605-1800
java.version=11.0.3
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_AR
Framework arguments:  -product org.eclipse.epp.package.jee.product -showLocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -showLocation -data /Users/pnussembaum/workspaces/workspace4

This is a continuation of log file /Users/pnussembaum/workspaces/workspace4/.metadata/.bak_0.log
Created Time: 2019-06-25 18:32:48.314

org.eclipse.core.resources
Error
Wed Jun 26 11:25:55 ART 2019
Problems occurred when invoking code from plug-in: "org.eclipse.core.resources".

java.lang.NullPointerException
Comment 4 Jay Arthanareeswaran CLA 2019-08-20 01:17:33 EDT
(In reply to Pablo Nussembaum from comment #3)
> I closed all open files then rebuilded the project and now I get an NPE on
> org.eclipse.core.resources without any stacktrace. 
> Is there anything that I can do get more debug information?

Hmm.. that looks like a different issue and probably unrelated to jdt core.

Are you not seeing the problem reported in comment #0 anymore?
Comment 5 Eclipse Genie CLA 2021-08-11 10:38:34 EDT
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.

If you have further information on the current state of the bug, please add it. 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.
Comment 6 Eclipse Genie CLA 2023-08-02 13:15:30 EDT
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.

If you have further information on the current state of the bug, please add it. 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.