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

(Java) Call hierarchy unavailable #558

Open
jrte opened this issue May 11, 2024 · 2 comments
Open

(Java) Call hierarchy unavailable #558

jrte opened this issue May 11, 2024 · 2 comments

Comments

@jrte
Copy link

jrte commented May 11, 2024

Type: Bug

Right-click on a Java method name and "Show Call Hierarchy". No calls from or to the method are displayed. This occurs for any method in my workspace, regardless of how many calls into/out of the method exist in the project. Other operations on Java symbols are similarly hosed ("Go To Declaration/Reference/Type Declaration/Implementation/...,", "Find All References/Implementations").

Java Server Mode in the status bar reads: "Java: Background task - 0%" (forever).

Java Build Status (from Java terminal):

5830c3f5 Synchronizing projects [Done]
de2b951c Validate documents [Done]
237eb853 Publish Diagnostics [Done]
ff24c84c Background task [Done]
d398b79d Update classpath Job [Done]
fb0ecb38 Building [Done]
220bbc2b Reconciling... [Done]
da5af34f Background task [Done]
a80a5517 Building [Done]
030bfe81 Reconciling... [Done]
98a90a67 Background task [Done]
a8508acb Reconciling... [Done]
33527f20 Background task [Done]
a497a11a Updating project configurations [Done]
a4108253 Building [Done]
c9f02ddc Building [Done]
ddb9a44a Register Watchers [Done]
4c4ebf48 Validate documents [Done]
84a22db5 Publish Diagnostics [Done]
e2371775 Building [Done]
60e09ffe Background task - 0%

Exception reported in ...\readhat.java\jdt_ws.metadata.log:

[Error - 9:16:09 AM] Request callHierarchy/outgoingCalls failed.
Message: Internal error.
Code: -32603
java.util.concurrent.CompletionException: java.lang.NullPointerException: Cannot read the array length because "superPermittedTypes" is null
at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:649)
at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Caused by: java.lang.NullPointerException: Cannot read the array length because "superPermittedTypes" is null
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.checkPermitsAndAdd(SourceTypeBinding.java:1346)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.checkPermitsInType(SourceTypeBinding.java:1202)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:1116)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:608)
at org.eclipse.jdt.internal.codeassist.SelectionEngine.selectType(SelectionEngine.java:1685)
at org.eclipse.jdt.internal.core.NamedMember.resolveType(NamedMember.java:332)
at org.eclipse.jdt.internal.core.NamedMember.resolveType(NamedMember.java:274)
at org.eclipse.jdt.internal.corext.dom.Bindings.sameParameter(Bindings.java:1103)
at org.eclipse.jdt.internal.corext.dom.Bindings.sameParameters(Bindings.java:1074)
at org.eclipse.jdt.internal.corext.dom.Bindings.findMethod(Bindings.java:1056)
at org.eclipse.jdt.internal.corext.callhierarchy.CalleeAnalyzerVisitor.findIncludingSupertypes(CalleeAnalyzerVisitor.java:309)
at org.eclipse.jdt.internal.corext.callhierarchy.CalleeAnalyzerVisitor.addMethodCall(CalleeAnalyzerVisitor.java:264)
at org.eclipse.jdt.internal.corext.callhierarchy.CalleeAnalyzerVisitor.visit(CalleeAnalyzerVisitor.java:177)
at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:220)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3382)
at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:136)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3405)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:128)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3382)
at org.eclipse.jdt.core.dom.TryStatement.accept0(TryStatement.java:274)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3405)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:128)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:3382)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:677)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3405)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:498)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:3405)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:258)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:3334)
at org.eclipse.jdt.internal.corext.callhierarchy.CalleeMethodWrapper.findChildren(CalleeMethodWrapper.java:101)
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.corext.callhierarchy.CalleeMethodWrapper.getCalls(CalleeMethodWrapper.java:58)
at org.eclipse.jdt.ls.core.internal.handlers.CallHierarchyHandler.getOutgoingCallItemsAt(CallHierarchyHandler.java:255)
at org.eclipse.jdt.ls.core.internal.handlers.CallHierarchyHandler.callHierarchyOutgoingCalls(CallHierarchyHandler.java:133)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$54(JDTLanguageServer.java:1183)
at org.eclipse.jdt.ls.core.internal.handlers.JDTLanguageServer.lambda$61(JDTLanguageServer.java:1236)
at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646)
... 6 more

Extension version: 1.3.1
VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs AMD Ryzen 5 5600H with Radeon Graphics (12 x 3294)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.37GB (8.86GB free)
Process Argv --crash-reporter-id ff545c42-bfb5-488b-b6a6-43d3bc1c4853
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
tftest:31042121
vstes516:30244333
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30995554
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
jchc7451:30973076
chatpanelt:31018789
dsvsc021:30996838
724cj586:31013169
fchga941:31038042
pythonprc:31039816
dwnewjupytercf:31039676

image

@jrte
Copy link
Author

jrte commented May 11, 2024

This resolved after second attempt to "Clean Java Server Workspace". First attempt did nothing. Client log is here: client.log.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jrte and others