Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in BinaryModuleBinding.create #3608

Open
jukzi opened this issue Jan 24, 2025 · 4 comments
Open

NPE in BinaryModuleBinding.create #3608

jukzi opened this issue Jan 24, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@jukzi
Copy link
Contributor

jukzi commented Jan 24, 2025

eclipse.buildId=4.35.0.I20250122-1800
java.version=22.0.2
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -data file:/C:/Users/jkubitz/platform-2025-01-02/ws/

org.eclipse.jdt.ui
Error
Fri Jan 24 11:48:13 CET 2025
Internal Error

java.lang.NullPointerException: Cannot invoke "org.eclipse.jdt.internal.compiler.env.IModule.isAutomatic()" because "module" is null
	at org.eclipse.jdt.internal.compiler.lookup.BinaryModuleBinding.create(BinaryModuleBinding.java:100)
	at org.eclipse.jdt.internal.compiler.impl.ITypeRequestor.accept(ITypeRequestor.java:65)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getModuleFromAnswer(LookupEnvironment.java:483)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForTypeFromModules(LookupEnvironment.java:420)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:282)
	at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getType(LookupEnvironment.java:1874)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.problemType(Scope.java:3235)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:677)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:715)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:542)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:617)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.process(MatchLocator.java:2023)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1352)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1389)
	at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1510)
	at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:143)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:276)
	at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:620)
	at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:677)
	at org.eclipse.jdt.internal.corext.callhierarchy.CallerMethodWrapper.findChildren(CallerMethodWrapper.java:155)
	at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.performSearch(MethodWrapper.java:265)
	at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.doFindChildren(MethodWrapper.java:196)
	at org.eclipse.jdt.internal.corext.callhierarchy.MethodWrapper.getCalls(MethodWrapper.java:87)
	at org.eclipse.jdt.internal.ui.callhierarchy.DeferredMethodWrapper.getCalls(DeferredMethodWrapper.java:72)
	at org.eclipse.jdt.internal.ui.callhierarchy.DeferredMethodWrapper.lambda$0(DeferredMethodWrapper.java:80)
	at org.eclipse.jdt.core.JavaCore.lambda$1(JavaCore.java:6166)
	at org.eclipse.jdt.internal.core.JavaModelManager.cacheZipFiles(JavaModelManager.java:5708)
	at org.eclipse.jdt.internal.core.JavaModelManager.callReadOnly(JavaModelManager.java:5697)
	at org.eclipse.jdt.core.JavaCore.callReadOnly(JavaCore.java:6150)
	at org.eclipse.jdt.core.JavaCore.runReadOnly(JavaCore.java:6165)
	at org.eclipse.jdt.internal.ui.callhierarchy.DeferredMethodWrapper.fetchDeferredChildren(DeferredMethodWrapper.java:80)
	at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:215)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

i tried to get call hierarchy of
org.eclipse.jface.text.Position.offset
and got that Exception reproducibly

Image

@jukzi jukzi added the bug Something isn't working label Jan 24, 2025
@jukzi
Copy link
Contributor Author

jukzi commented Jan 24, 2025

cc @stephan-herrmann because the code in the stacktrace was mostly written by you

@jukzi
Copy link
Contributor Author

jukzi commented Jan 24, 2025

@jukzi
Copy link
Contributor Author

jukzi commented Jan 24, 2025

reproducable after update to 4.35.0.I20250123-1800 and restart

@stephan-herrmann
Copy link
Contributor

i tried to get call hierarchy of
org.eclipse.jface.text.Position.offset
and got that Exception reproducibly

Works fine for me in I20250123-1800

As you mentioned https://bugs.eclipse.org/bugs/show_bug.cgi?id=529367 do you see its debug output on the console? See LookupEnvironment.java:486.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants